From ff18845f8b5f118d05b33dd791f38416b8b29d9d Mon Sep 17 00:00:00 2001 From: Mike Date: Sun, 5 Nov 2023 17:48:59 -0500 Subject: [PATCH] Run pyinstaller build in isolated env using `tox` --- .github/workflows/build-test-release.yml | 9 +++------ pyproject.toml | 1 + tox.ini | 6 ++++++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index f16a8823..3a49f31d 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -483,11 +483,8 @@ jobs: - name: Upgrade `pip` and install `wheel` run: python -m pip install --upgrade pip wheel - - name: Install randomizer dependencies - run: pip install . - - - name: Install pyinstaller - run: pip install -U pyinstaller + - name: Install tox + run: pip install tox - name: Download base patches uses: actions/download-artifact@v3 @@ -498,7 +495,7 @@ jobs: mv ./**/*.bps base/out - name: Build randomizer executable - run: pyinstaller ph_rando.spec + run: tox -e build - name: Get current commit hash id: commit-hash diff --git a/pyproject.toml b/pyproject.toml index aaf17bde..73c2e87f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,6 +33,7 @@ types = [ "types-setuptools~=68.2.0.0", "types-tqdm~=4.66.0.1", ] +pyinstaller = ["pyinstaller==6.1.0"] [project.scripts] ph_rando = "ph_rando.ui.main:main" diff --git a/tox.ini b/tox.ini index cc0d5377..4f2656f4 100644 --- a/tox.ini +++ b/tox.ini @@ -30,5 +30,11 @@ extras = commands = pytest --numprocesses auto {posargs} tests/desmume +[testenv:build] +extras = + pyinstaller +commands = + pyinstaller ph_rando.spec + [pytest] addopts = --strict-markers --showlocals --verbose