Skip to content

Commit e8d0162

Browse files
Replace Nuitka with PyInstaller for builds
1 parent 9974803 commit e8d0162

1 file changed

Lines changed: 23 additions & 31 deletions

File tree

.github/workflows/release-binaries.yml

Lines changed: 23 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -85,46 +85,39 @@ jobs:
8585
key: pip-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
8686
restore-keys: pip-${{ runner.os }}-
8787

88-
- name: Cache Nuitka
89-
uses: actions/cache@v4
90-
with:
91-
path: ~/.cache/Nuitka
92-
key: nuitka-${{ runner.os }}-${{ hashFiles('**/*.py') }}
93-
restore-keys: nuitka-${{ runner.os }}-
94-
95-
- name: Install system deps (Linux)
96-
if: runner.os == 'Linux'
97-
run: sudo apt-get install -y patchelf
98-
99-
- name: MSVC setup (Windows)
100-
if: runner.os == 'Windows'
101-
uses: ilammy/msvc-dev-cmd@v1
102-
10388
- name: Install Python deps
10489
shell: bash
10590
run: |
106-
python -m pip install -U pip wheel nuitka zstandard
91+
python -m pip install -U pip wheel pyinstaller
10792
pip install ".[all]"
10893
109-
- name: Build with Nuitka
94+
- name: Build with PyInstaller
11095
shell: bash
11196
env:
11297
VERSION: ${{ needs.tag.outputs.version }}
11398
run: |
11499
printf 'from bangen.app import main\nif __name__ == "__main__":\n main()\n' > _entry.py
115-
python -m nuitka \
116-
--mode=onefile \
117-
--assume-yes-for-downloads \
118-
--output-dir=build \
119-
--output-filename=bangen \
120-
--include-package=bangen \
121-
--include-package=pyfiglet \
122-
--include-package=rich \
123-
--include-package=PIL \
124-
--include-package=typer \
125-
--nofollow-import-to=tkinter,unittest,test,distutils,setuptools,pkg_resources,email,http,html,xml,xmlrpc \
126-
--python-flag=no_asserts,no_docstrings,isolated \
127-
--onefile-tempdir-spec="{CACHE_DIR}/bangen/$VERSION" \
100+
python -m PyInstaller \
101+
--onefile \
102+
--name bangen \
103+
--distpath build \
104+
--collect-all bangen \
105+
--collect-all pyfiglet \
106+
--collect-all rich \
107+
--collect-all PIL \
108+
--collect-all typer \
109+
--exclude-module tkinter \
110+
--exclude-module unittest \
111+
--exclude-module test \
112+
--exclude-module distutils \
113+
--exclude-module setuptools \
114+
--exclude-module pkg_resources \
115+
--exclude-module email \
116+
--exclude-module http \
117+
--exclude-module html \
118+
--exclude-module xml \
119+
--exclude-module xmlrpc \
120+
--optimize 2 \
128121
_entry.py
129122
130123
- name: Package artifact
@@ -187,7 +180,6 @@ jobs:
187180
SINCE_LINE="> Initial release"
188181
fi
189182
190-
# Bucket commits by conventional prefix
191183
FEATS=$(echo "$COMMITS" | grep -E "^- feat" | sed 's/^- feat[^:]*: /- /' || true)
192184
FIXES=$(echo "$COMMITS" | grep -E "^- fix" | sed 's/^- fix[^:]*: /- /' || true)
193185
CHORES=$(echo "$COMMITS" | grep -E "^- (chore|refactor|perf|build|ci)" | sed 's/^- [^:]*: /- /' || true)

0 commit comments

Comments
 (0)