Installtools und Liste der python packages an die neuere Arte der Python installation angepasst
This commit is contained in:
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"python.languageServer": "None",
|
||||
"python.languageServer": "Default",
|
||||
"cSpell.words": [
|
||||
"DXFATTRIBS",
|
||||
"ezdxf"
|
||||
|
||||
@@ -245,7 +245,6 @@ Key Python packages (see [lib/requirements.txt](lib/requirements.txt)):
|
||||
- `pandas` - Data manipulation
|
||||
- `matplotlib` - Graph visualization
|
||||
- `dacite` - Dataclass conversion utilities
|
||||
- `PyMuPDF` - PDF processing capabilities
|
||||
- `pillow` - Image processing (flag/icon generation)
|
||||
- `pytest` - Testing framework
|
||||
|
||||
|
||||
+6
-1
@@ -19,6 +19,7 @@ REM Namen der Ergebnisdateien
|
||||
set ERROR_DOUBLE=%FILENAME%_errors.json
|
||||
set EXCEL_RES=%FILENAME%_cables.xlsx
|
||||
set DXF_RES=%FILENAME%_cables.dxf
|
||||
set BOM_RES=%FILENAME%_BOM.xlsx
|
||||
|
||||
if exist "%~dp0_setenv.bat" (
|
||||
echo Lade lokale Umgebungseinstellungen aus _setenv.bat...
|
||||
@@ -63,8 +64,12 @@ if not exist "%PROJECT_WORK%\%EXCEL_RES%" (
|
||||
)
|
||||
echo.
|
||||
|
||||
move %PROJECT_WORK%\%FILENAME%_* %TARGET_DIR%
|
||||
REM nur die eigenen Ergebnisdateien verschieben (kein Wildcard, sonst werden z.B. bei "easy" auch "easy_sps_*" mitgenommen)
|
||||
for %%f in (%JSON_POS% %JSON_TODRAW% %DXF_RES% %EXCEL_RES% %BOM_RES% %ERROR_DOUBLE%) do (
|
||||
if exist "%PROJECT_WORK%\%%f" move "%PROJECT_WORK%\%%f" "%TARGET_DIR%"
|
||||
)
|
||||
pause
|
||||
goto :eof
|
||||
|
||||
|
||||
:usage
|
||||
|
||||
+12
-5
@@ -1,14 +1,21 @@
|
||||
call setenv.bat
|
||||
call "%~dp0setenv.bat"
|
||||
if "%PROJECT%"=="" (
|
||||
ECHO FEHLER: PROJECT ist nicht gesetzt!
|
||||
exit /b 1
|
||||
)
|
||||
REM Python 3.12: numpy 1.26 / pandas 2.1 aus requirements.txt gibt es nicht fuer neuere Versionen
|
||||
if not exist %PROJECT%\.venv (
|
||||
ECHO Initialisiere Python virtual environment...
|
||||
py -m venv %PROJECT%\.venv --upgrade-deps
|
||||
uv venv %PROJECT%\.venv --python 3.12 || exit /b 1
|
||||
ECHO Erfolgreich.
|
||||
|
||||
call %PROJECT%\.venv\Scripts\activate.bat
|
||||
ECHO Installiere erforderliche Python Packages...
|
||||
pip install -r %PROJECT_LIB%/requirements.txt -q
|
||||
uv pip install --python %PROJECT%\.venv -r %PROJECT_LIB%/requirements.txt -q || (
|
||||
ECHO FEHLER: Installation fehlgeschlagen, entferne .venv
|
||||
rmdir /s /q %PROJECT%\.venv
|
||||
exit /b 1
|
||||
)
|
||||
ECHO Erfolgreich
|
||||
deactivate
|
||||
|
||||
) ELSE (
|
||||
ECHO Erforderliche Python Packages bereits installiert!
|
||||
|
||||
+8
-5
@@ -2,16 +2,19 @@
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
source "$SCRIPT_DIR/setenv.sh"
|
||||
|
||||
# Python 3.12: numpy 1.26 / pandas 2.1 aus requirements.txt gibt es nicht fuer neuere Versionen
|
||||
if [ ! -d "$PROJECT/.venv" ]; then
|
||||
echo "Initialisiere Python virtual environment..."
|
||||
python3 -m venv "$PROJECT/.venv" --upgrade-deps
|
||||
uv venv "$PROJECT/.venv" --python 3.12 || exit 1
|
||||
echo "Erfolgreich."
|
||||
|
||||
source "$PROJECT/.venv/bin/activate"
|
||||
|
||||
echo "Installiere erforderliche Python Packages..."
|
||||
pip install -r "$PROJECT_LIB/requirements.txt" -q
|
||||
if ! uv pip install --python "$PROJECT/.venv" -r "$PROJECT_LIB/requirements.txt" -q; then
|
||||
echo "FEHLER: Installation fehlgeschlagen, entferne .venv"
|
||||
rm -rf "$PROJECT/.venv"
|
||||
exit 1
|
||||
fi
|
||||
echo "Erfolgreich"
|
||||
deactivate
|
||||
else
|
||||
echo "Erforderliche Python Packages bereits installiert!"
|
||||
fi
|
||||
|
||||
+2
-1
@@ -25,7 +25,8 @@ if not exist %PROJECT%\translation mkdir %PROJECT%\translation
|
||||
if not exist %PROJECT%\logs mkdir %PROJECT%\logs
|
||||
|
||||
set PROJECT_IO_RESULTS=Z:\Automatisierung\Konvertierungstools\4_io-Konvertierer
|
||||
set PROJECT_BOM_RESULTS=Z:\Automatisierung\Konvertierungstools\3_Kabellaengen-Konvertierer
|
||||
REM Kann vorab gesetzt werden (z.B. von run_tests.py), damit Testergebnisse in work bleiben
|
||||
if not defined PROJECT_BOM_RESULTS set PROJECT_BOM_RESULTS=Z:\Automatisierung\Konvertierungstools\3_Kabellaengen-Konvertierer
|
||||
set INSTALL_DIR="%ONEDRIVE%\Desktop\Kabeltool"
|
||||
|
||||
if exist "%~dp0_setenv.bat" (
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
build==1.2.2.post1
|
||||
click==8.1.8
|
||||
colorama==0.4.6
|
||||
contourpy==1.3.1
|
||||
cycler==0.12.1
|
||||
dacite==1.9.2
|
||||
dataclasses==0.6
|
||||
et-xmlfile==1.1.0
|
||||
ezdxf==1.4.1
|
||||
fonttools==4.57.0
|
||||
@@ -17,21 +14,13 @@ openpyxl==3.1.2
|
||||
packaging==24.2
|
||||
pandas==2.1.1
|
||||
pillow==11.1.0
|
||||
pip-tools==7.4.1
|
||||
pluggy==1.6.0
|
||||
Pygments==2.19.2
|
||||
PyMuPDF==1.25.5
|
||||
pyparsing==3.2.3
|
||||
pyproject_hooks==1.2.0
|
||||
pytest==9.0.2
|
||||
python-dateutil==2.8.2
|
||||
pytz==2023.3.post1
|
||||
setuptools==80.0.0
|
||||
shapely==2.1.0
|
||||
shiboken6==6.9.0
|
||||
six==1.16.0
|
||||
snakeviz==2.2.2
|
||||
tornado==6.5.1
|
||||
typing_extensions==4.13.1
|
||||
tzdata==2023.3
|
||||
wheel==0.45.1
|
||||
|
||||
+4
-1
@@ -74,8 +74,11 @@ class TestRunner:
|
||||
|
||||
# Execute getexdraw.bat with automated input to handle pause
|
||||
cmd = [str(self.getexdraw_bat), str(dxf_file)]
|
||||
# Ergebnisse in work statt im produktiven Netzlaufwerk ablegen
|
||||
env = os.environ.copy()
|
||||
env['PROJECT_BOM_RESULTS'] = str(self.work_dir)
|
||||
# Send newline to handle the pause command
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, shell=True, input="\n")
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, shell=True, input="\n", env=env)
|
||||
|
||||
# Check if the expected output files were created instead of relying on return code
|
||||
# The batch script always exits with code 1 due to interactive design, but files are created
|
||||
|
||||
Reference in New Issue
Block a user