diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 20485cc5..b368147a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -68,6 +68,9 @@ jobs: password: ${{ secrets.B2_PYPI_PASSWORD }} deploy-linux-bundle: needs: deploy + env: + PYTHON_DEFAULT_VERSION: "3.10" # Use Ubuntu 22.04's distro Python for staticx. + UV_PYTHON_DOWNLOADS: "never" strategy: fail-fast: false matrix: @@ -77,10 +80,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: deadsnakes/action@v3.2.0 # staticx doesn't work with python installed by setup-python action - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - uses: astral-sh/setup-uv@v7 with: version: ${{ env.UV_VERSION }} @@ -88,8 +87,8 @@ jobs: - name: Install dependencies run: | sudo apt-get -y update - sudo apt-get -y install patchelf scons - uv sync --python ${{ env.PYTHON_DEFAULT_VERSION }} --locked --group nox + sudo apt-get -y install python${{ env.PYTHON_DEFAULT_VERSION }}-dev python${{ env.PYTHON_DEFAULT_VERSION }}-venv patchelf scons + uv sync --python /usr/bin/python${{ env.PYTHON_DEFAULT_VERSION }} --locked --group nox git config --global --add safe.directory '*' - name: Bundle the distribution id: bundle diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48db8dfe..b296ef23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -195,6 +195,8 @@ jobs: timeout-minutes: 90 needs: cleanup_buckets env: + PYTHON_DEFAULT_VERSION: "3.10" # Use Ubuntu 22.04's distro Python for staticx. + UV_PYTHON_DOWNLOADS: "never" B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} WORKFLOW_ID: ${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }} @@ -207,10 +209,6 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: deadsnakes/action@v3.2.0 # staticx doesn't work with python installed by setup-python action - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - uses: astral-sh/setup-uv@v7 with: version: ${{ env.UV_VERSION }} @@ -218,8 +216,8 @@ jobs: - name: Install dependencies run: | sudo apt-get -y update - sudo apt-get -y install patchelf scons - uv sync --python ${{ env.PYTHON_DEFAULT_VERSION }} --locked --group nox + sudo apt-get -y install python${{ env.PYTHON_DEFAULT_VERSION }}-dev python${{ env.PYTHON_DEFAULT_VERSION }}-venv patchelf scons + uv sync --python /usr/bin/python${{ env.PYTHON_DEFAULT_VERSION }} --locked --group nox git config --global --add safe.directory '*' - name: Bundle the distribution id: bundle diff --git a/changelog.d/+linux-bundle-distro-python.infrastructure.md b/changelog.d/+linux-bundle-distro-python.infrastructure.md new file mode 100644 index 00000000..89875cfa --- /dev/null +++ b/changelog.d/+linux-bundle-distro-python.infrastructure.md @@ -0,0 +1 @@ +Build standalone Linux executables with Ubuntu 22.04's system Python 3.10, removing the dependency on the deadsnakes PPA in CI and release builds.