Skip to content

Commit

Permalink
ci(pyinstaller): add hatch config and documentation to build the app …
Browse files Browse the repository at this point in the history
…using PyInstaller
  • Loading branch information
laurent-laporte-pro committed May 7, 2024
1 parent b696ad7 commit b8463b2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,13 @@ hatch clean
```

This command will remove the `dist` directory.

## Building the binary distribution

➢ To build the binary distribution, run:

```shell
hatch run pyinstaller:build
```

This command will run PyInstaller and generate a standalone executable in the `dist` directory.
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ build = "mkdocs build -f mkdocs.yml {args}"
serve = "mkdocs serve -f mkdocs.yml {args}"
gh-deploy = "mkdocs gh-deploy -f mkdocs.yml {args}"

[tool.hatch.envs.pyinstaller]
detached = true
dependencies = ["pyinstaller"]

[tool.hatch.envs.pyinstaller.scripts]
build = "pyinstaller --name AntaresWebInstaller --onefile src/antares_web_installer/__main__.py"

[tool.mypy]
mypy_path = 'src, tests'
Expand Down

0 comments on commit b8463b2

Please sign in to comment.