Skip to content

Commit e7645e9

Browse files
committed
fix: aggiorna i riferimenti al file principale per la creazione dell'eseguibile
1 parent fdadcc3 commit e7645e9

4 files changed

Lines changed: 13 additions & 5 deletions

File tree

.github/workflows/release-binaries.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
run: echo "AKOMA_VERSION=$(python setup.py --version)" >> $GITHUB_ENV
3333

3434
- name: Build binary
35-
run: pyinstaller --onefile --name normattiva2md src/normattiva2md/cli.py
35+
run: pyinstaller --onefile --name normattiva2md __main__.py
3636

3737
- name: Copy XML fixture
3838
run: cp test_data/20050516_005G0104_VIGENZA_20250130.xml .
@@ -82,7 +82,7 @@ jobs:
8282
8383
- name: Build binary
8484
shell: pwsh
85-
run: pyinstaller --onefile --name normattiva2md src/normattiva2md/cli.py
85+
run: pyinstaller --onefile --name normattiva2md __main__.py
8686

8787
- name: Copy XML fixture
8888
shell: pwsh

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
PYTHON := python3
77
PIP := pip3
88
PACKAGE_NAME := normattiva2md
9-
SCRIPT_NAME := src/normattiva2md/cli.py
10-
MAIN_SCRIPT := src/normattiva2md/cli.py
9+
SCRIPT_NAME := __main__.py
10+
MAIN_SCRIPT := __main__.py
1111

1212
# Target di default
1313
help:

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Per creare un eseguibile autonomo per uso locale:
400400

401401
```bash
402402
pip install pyinstaller
403-
pyinstaller --onefile --name normattiva2md src/normattiva2md/cli.py
403+
pyinstaller --onefile --name normattiva2md __main__.py
404404
# L'eseguibile sarà in dist/normattiva2md
405405
```
406406

__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Entry point per PyInstaller
4+
"""
5+
from src.normattiva2md.cli import main
6+
7+
if __name__ == "__main__":
8+
main()

0 commit comments

Comments
 (0)