Include requirements.txt in delivery; install.bat falls back to parent copy and tolerates missing python installer

This commit is contained in:
Sadmin committed 2026-11-02 16:38:22 +03:00
1 parent c0959f9489
commit 366720c997
3 files changed
+29 -8

No files matched your search

+1 -2
View File
@@ -6,9 +6,8 @@ delivery/languagetool/
delivery/ollama/
delivery/wheelhouse/
delivery/logs/
# копии исходников внутри комплекта (источник — корень репо)
# копия исходника внутри комплекта (источник — корень репо)
delivery/app.py
delivery/requirements.txt
# генерируемые артефакты
samples/
static/.DS_Store
+23 -6
View File
@@ -2,13 +2,30 @@
REM One-time install: Python (current user) + deps (wheelhouse or PyPI).
cd /d %~dp0
echo [1/2] Python setup (quiet, current user), takes ~1 min...
python-3.12.10-amd64.exe /quiet InstallAllUsers=0 PrependPath=1 Include_launcher=0 Include_test=0
echo [2/2] Python dependencies...
"%LocalAppData%\Programs\Python\Python312\python.exe" -m venv venv
if exist wheelhouse (
venv\Scripts\python.exe -m pip install --no-index --find-links wheelhouse -r requirements.txt
if exist python-3.12.10-amd64.exe (
python-3.12.10-amd64.exe /quiet InstallAllUsers=0 PrependPath=1 Include_launcher=0 Include_test=0
) else (
venv\Scripts\python.exe -m pip install -r requirements.txt
echo Python installer not found here - skipping, expecting Python already installed...
)
echo [2/2] Python dependencies...
set "REQ=requirements.txt"
if not exist "%REQ%" set "REQ=..\requirements.txt"
if not exist "%REQ%" (
echo ERROR: requirements.txt not found in delivery or parent folder
if /i not "%~1"=="NOPAUSE" pause
exit /b 1
)
if not exist venv\Scripts\python.exe (
"%LocalAppData%\Programs\Python\Python312\python.exe" -m venv venv || (
echo ERROR: failed to create venv - is Python installed?
if /i not "%~1"=="NOPAUSE" pause
exit /b 1
)
)
if exist wheelhouse (
venv\Scripts\python.exe -m pip install --no-index --find-links wheelhouse -r "%REQ%"
) else (
venv\Scripts\python.exe -m pip install -r "%REQ%"
)
echo Done.
if /i not "%~1"=="NOPAUSE" pause
+5
View File
@@ -0,0 +1,5 @@
fastapi
uvicorn
httpx
python-docx
python-multipart