From 98bc0321d63c5dd9792661f69f0a71fa15f8d8ae Mon Sep 17 00:00:00 2001 From: Matt M Date: Thu, 26 Sep 2024 09:46:37 -0700 Subject: [PATCH] mebbe --- .github/workflows/python.yml | 11 +++++++---- photon-lib/py/setup.py | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 6c524c1ad..09d2c08cf 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -106,12 +106,15 @@ jobs: distribution: temurin - run: git fetch --tags --force - - run: python3 -c "from sysconfig import get_paths as gp; print(gp())" + - run: python${{ matrix.python_version }} -c "from sysconfig import get_paths as gp; print(gp())" - - run: ./gradlew photon-lib:tasks -i -PpythonExecutable=python${{ matrix.python_version }} + - run: ./gradlew photon-lib:tasks -i -PpythonExecutable="python${{ matrix.python_version }}"" - run: | chmod +x gradlew - ./gradlew photon-lib:installPhotonlibpyNative -PpythonExecutable=python${{ matrix.python_version }} + ./gradlew photon-lib:installPhotonlibpyNative -PpythonExecutable="python${{ matrix.python_version }}"" + + - run: find . + working-directory: ./photon-lib/py - name: Install dependencies working-directory: ./photon-lib/py @@ -246,7 +249,7 @@ jobs: working-directory: ./photon-lib/py # disable isolation so we can run stubgen (ew but w/e) run: | - /build/venv/bin/cross-python -m build -swn + SKIP_PYI=1 /build/venv/bin/cross-python -m build -swn - name: Upload artifacts uses: actions/upload-artifact@v4 diff --git a/photon-lib/py/setup.py b/photon-lib/py/setup.py index f9df1ac09..d30a363af 100644 --- a/photon-lib/py/setup.py +++ b/photon-lib/py/setup.py @@ -68,7 +68,9 @@ def finalize_options(self): script_path = os.path.dirname(os.path.realpath(__file__)) -if not os.path.exists(f"{script_path}/photonlibpy/lib/_photonlibpy.pyi"): +if not os.path.exists( + f"{script_path}/photonlibpy/lib/_photonlibpy.pyi" +) and not os.getenv("SKIP_PYI"): print("Generating typehints") try: from create_photonlib_pyi import write_stubgen