-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from timsutton/pyinstaller-20221004
Set up PyInstaller for self-contained binary
- Loading branch information
Showing
7 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
.DS_Store | ||
.venv | ||
build/ | ||
dist-*/ | ||
pkgroot/ | ||
*.pkg | ||
*.pyc | ||
|
||
*.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# This script will output a single self-contained executable at | ||
# the output specified to pyinstaller's `--distpath` option | ||
|
||
set -eu -o pipefail | ||
|
||
# Pick a Python distribution to use, we'll use Apple's for now | ||
PYTHON_DIST_BIN=/usr/bin/python3 | ||
# PYTHON_DIST_BIN=/opt/homebrew/bin/python3 | ||
|
||
# clean and setup | ||
command -v deactivate && deactivate | ||
rm -rf .venv dist-* | ||
"${PYTHON_DIST_BIN}" -m venv .venv | ||
source .venv/bin/activate | ||
|
||
# build virtualenv | ||
pip install -U pip | ||
pip install -r requirements-build.txt | ||
|
||
# build it | ||
pyinstaller \ | ||
--clean \ | ||
--log-level DEBUG \ | ||
--distpath dist-onefile \ | ||
--onefile \ | ||
customdisplayprofiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-r requirements-dev.txt | ||
-r requirements-pyinstaller.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-r requirements.txt | ||
|
||
black==22.1.0 | ||
click==8.0.4 | ||
isort==5.10.1 | ||
mypy-extensions==0.4.3 | ||
pathspec==0.9.0 | ||
platformdirs==2.5.0 | ||
tomli==2.0.1 | ||
typing_extensions==4.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
altgraph==0.17.3 | ||
macholib==1.16.2 | ||
pyinstaller==5.4.1 | ||
pyinstaller-hooks-contrib==2022.10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pyobjc==8.5.1 |