clean up: remove unused start.sh/pyinstaller.spec, deduplicate constants, update .gitignore
This commit is contained in:
parent
ec74b07eb0
commit
56db0257be
4 changed files with 7 additions and 87 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,7 +1,12 @@
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
.env
|
||||||
tinyweb_identity
|
tinyweb_identity
|
||||||
index.db
|
index.db
|
||||||
index.db-shm
|
index.db-shm
|
||||||
index.db-wal
|
index.db-wal
|
||||||
models/
|
models/
|
||||||
index.hnsw
|
index.hnsw
|
||||||
|
*.db
|
||||||
|
*.db-shm
|
||||||
|
*.db-wal
|
||||||
|
|
|
||||||
6
app.py
6
app.py
|
|
@ -13,8 +13,6 @@ import templates as templates_mod
|
||||||
import gateway
|
import gateway
|
||||||
from gateway import GatewayState, GatewayHandler
|
from gateway import GatewayState, GatewayHandler
|
||||||
|
|
||||||
APP_NAME = "tinyweb"
|
|
||||||
ASPECTS = ["server"]
|
|
||||||
IDENTITY_FILE = "tinyweb_identity"
|
IDENTITY_FILE = "tinyweb_identity"
|
||||||
DEFAULT_TRANSPORT_HOST = "rnode.bre.land"
|
DEFAULT_TRANSPORT_HOST = "rnode.bre.land"
|
||||||
DEFAULT_TRANSPORT_PORT = 4242
|
DEFAULT_TRANSPORT_PORT = 4242
|
||||||
|
|
@ -265,8 +263,8 @@ def main():
|
||||||
identity,
|
identity,
|
||||||
RNS.Destination.IN,
|
RNS.Destination.IN,
|
||||||
RNS.Destination.SINGLE,
|
RNS.Destination.SINGLE,
|
||||||
APP_NAME,
|
gateway.APP_NAME,
|
||||||
*ASPECTS,
|
*gateway.ASPECTS,
|
||||||
)
|
)
|
||||||
|
|
||||||
destination.register_request_handler(
|
destination.register_request_handler(
|
||||||
|
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
||||||
# -*- mode: python ; coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
|
|
||||||
block_cipher = None
|
|
||||||
|
|
||||||
# Hidden imports that PyInstaller can't detect automatically
|
|
||||||
hiddenimports = [
|
|
||||||
"RNS",
|
|
||||||
"RNS.Destination",
|
|
||||||
"RNS.Identity",
|
|
||||||
"RNS.Reticulum",
|
|
||||||
"onnxruntime",
|
|
||||||
"onnxruntime.capi.onnxruntime_pybind11_state",
|
|
||||||
"tokenizers",
|
|
||||||
"huggingface_hub",
|
|
||||||
"hnswlib",
|
|
||||||
"bs4",
|
|
||||||
"beautifulsoup4",
|
|
||||||
"numpy",
|
|
||||||
"requests",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Data files to include
|
|
||||||
datas = [
|
|
||||||
("themes", "themes"),
|
|
||||||
]
|
|
||||||
|
|
||||||
# Exclude unnecessary modules
|
|
||||||
excludes = [
|
|
||||||
"test",
|
|
||||||
"tests",
|
|
||||||
"tkinter",
|
|
||||||
"matplotlib",
|
|
||||||
"scipy",
|
|
||||||
"pandas",
|
|
||||||
"IPython",
|
|
||||||
"jupyter",
|
|
||||||
"notebook",
|
|
||||||
]
|
|
||||||
|
|
||||||
a = Analysis(
|
|
||||||
["app.py"],
|
|
||||||
pathex=[],
|
|
||||||
binaries=[],
|
|
||||||
datas=datas,
|
|
||||||
hiddenimports=hiddenimports,
|
|
||||||
hookspath=[],
|
|
||||||
hooksconfig={},
|
|
||||||
runtime_hooks=[],
|
|
||||||
excludes=excludes,
|
|
||||||
win_no_prefer_redirects=False,
|
|
||||||
win_private_assemblies=False,
|
|
||||||
cipher=block_cipher,
|
|
||||||
noarchive=False,
|
|
||||||
)
|
|
||||||
|
|
||||||
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
||||||
|
|
||||||
exe = EXE(
|
|
||||||
pyz,
|
|
||||||
a.scripts,
|
|
||||||
a.binaries,
|
|
||||||
a.zipfiles,
|
|
||||||
a.datas,
|
|
||||||
[],
|
|
||||||
name="TinyWeb",
|
|
||||||
debug=False,
|
|
||||||
bootloader_ignore_signals=False,
|
|
||||||
strip=False,
|
|
||||||
upx=True,
|
|
||||||
upx_exclude=[],
|
|
||||||
runtime_tmpdir=None,
|
|
||||||
console=True,
|
|
||||||
disable_windowed_traceback=False,
|
|
||||||
argv_emulation=False,
|
|
||||||
target_arch=None,
|
|
||||||
codesign_identity=None,
|
|
||||||
entitlements_file=None,
|
|
||||||
)
|
|
||||||
2
start.sh
2
start.sh
|
|
@ -1,2 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
exec /nix/store/vhgmnrmvvfdiw0kc2xz8px7rvg60lszc-python3-3.13.12-env/bin/python /home/user/apps/tinyweb/app.py --bind 0.0.0.0
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue