Skip to content

Commit

Permalink
Support require-libpython in the wheel
Browse files Browse the repository at this point in the history
If we're in a user-local install or a venv and we have no libpython SOs linked,
create symlinks and fail if we can't

Release 0.0.6
  • Loading branch information
arcivanov committed Sep 19, 2024
1 parent af7241d commit 7270569
Show file tree
Hide file tree
Showing 13 changed files with 488 additions and 149 deletions.
46 changes: 46 additions & 0 deletions .github/exclusions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"python-version": "3.12",
"setuptools-version": "65.7"
},
{
"python-version": "3.12",
"setuptools-version": "64.0"
},
{
"python-version": "3.12",
"setuptools-version": "63.4"
},
{
"python-version": "3.12",
"setuptools-version": "62.6"
},
{
"python-version": "3.12",
"pip-version": "22.3"
},
{
"python-version": "3.13-dev",
"setuptools-version": "65.7"
},
{
"python-version": "3.13-dev",
"setuptools-version": "65.7"
},
{
"python-version": "3.13-dev",
"setuptools-version": "64.0"
},
{
"python-version": "3.13-dev",
"setuptools-version": "63.4"
},
{
"python-version": "3.13-dev",
"setuptools-version": "62.6"
},
{
"python-version": "3.13-dev",
"pip-version": "22.3"
}
]
262 changes: 123 additions & 139 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,154 +7,138 @@ on:
branches:
- master
jobs:
build-primary:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-13
python-version:
- '3.12'
- '3.11'
- '3.10'
pip-version:
- '24.2'
- '24.1'
- '24.0'
- '23.3'
- '22.3'
setuptools-version:
- '72.1'
- '71.1'
- '70.3'
- '69.5'
- '68.2'
- '67.8'
- '66.1'
- '65.7'
exclude:
- python-version: '3.12'
setuptools-version: '65.7'
- python-version: '3.12'
pip-version: '22.3'
env:
DEPLOY_PYTHONS: "3.12"
DEPLOY_OSES: "Linux"
DEPLOY_PIPS: "24.2"
DEPLOY_SETUPTOOLS: "72.1"
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- shell: bash
run: |
echo "PYB_EXTRA_ARGS=--no-venvs" >> $GITHUB_ENV
echo "SETUPTOOLS_VER=~=${{matrix.setuptools-version}}" >> $GITHUB_ENV
echo "PIP_VER=~=${{matrix.pip-version}}" >> $GITHUB_ENV
- shell: bash
if: |
github.event_name == 'push' &&
contains(env.DEPLOY_OSES, runner.os) &&
contains(env.DEPLOY_PYTHONS, matrix.python-version) &&
contains(env.DEPLOY_PIPS, matrix.pip-version) &&
contains(env.DEPLOY_SETUPTOOLS, matrix.setuptools-version)
run: |
echo "PYB_EXTRA_ARGS=+upload --no-venvs" >> $GITHUB_ENV
- uses: pybuilder/build@master
with:
checkout: false
with-venv: false
python-version: ${{ matrix.python-version }}
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }}

build-secondary:
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-13
python-version:
- '3.9'
- '3.8'
pip-version:
- '24.2'
- '24.1'
- '24.0'
- '23.3'
- '22.3'
setuptools-version:
- '72.1'
- '71.1'
- '70.3'
- '69.5'
- '68.2'
- '67.8'
- '66.1'
- '65.7'
- '64.0'
- '63.4'
- '62.6'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
read-exclusions:
runs-on: ubuntu-latest
outputs:
BUILD_EXCLUSIONS: ${{ steps.read-exclusions-step.outputs.BUILD_EXCLUSIONS }}
steps:
- uses: actions/checkout@v4
- shell: bash
- id: read-exclusions-step
run: |
echo "PYB_EXTRA_ARGS=--no-venvs" >> $GITHUB_ENV
echo "SETUPTOOLS_VER=~=${{matrix.setuptools-version}}" >> $GITHUB_ENV
echo "PIP_VER=~=${{matrix.pip-version}}" >> $GITHUB_ENV
- uses: pybuilder/build@master
with:
checkout: false
with-venv: false
python-version: ${{ matrix.python-version }}
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }}
set -xeEu
set -o pipefail
{
echo 'BUILD_EXCLUSIONS<<EOF'
cat ./.github/exclusions.json
echo -e '\nEOF'
} >> "$GITHUB_OUTPUT"
build-experimental:
runs-on: ${{ matrix.os }}
continue-on-error: true
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-13
python-version:
- '3.13-dev'
pip-version:
- '24.2'
setuptools-version:
- '72.1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- shell: bash
run: |
echo "PYB_EXTRA_ARGS=--no-venvs" >> $GITHUB_ENV
echo "SETUPTOOLS_VER=~=${{matrix.setuptools-version}}" >> $GITHUB_ENV
echo "PIP_VER=~=${{matrix.pip-version}}" >> $GITHUB_ENV
- uses: pybuilder/build@master
with:
checkout: false
with-venv: false
python-version: ${{ matrix.python-version }}
pyb-extra-args: ${{ env.PYB_EXTRA_ARGS }}
build-ubuntu-py312:
uses: ./.github/workflows/template.yml
with:
os: ubuntu-latest
python-version: '3.12'
deploy: ${{ github.event_name == 'push' }}
deploy-pip: '24.2'
deploy-setuptools: '75.1'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ read-exclusions ]
build-macos-py312:
uses: ./.github/workflows/template.yml
with:
os: macos-13
python-version: '3.12'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ build-ubuntu-py312, read-exclusions ]
build-ubuntu-py311:
uses: ./.github/workflows/template.yml
with:
os: ubuntu-latest
python-version: '3.11'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ read-exclusions ]
build-macos-py311:
uses: ./.github/workflows/template.yml
with:
os: macos-13
python-version: '3.11'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ build-ubuntu-py311, read-exclusions ]
build-ubuntu-py310:
uses: ./.github/workflows/template.yml
with:
os: ubuntu-latest
python-version: '3.10'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ read-exclusions ]
build-macos-py310:
uses: ./.github/workflows/template.yml
with:
os: macos-13
python-version: '3.10'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ build-ubuntu-py310, read-exclusions ]
build-ubuntu-py39:
uses: ./.github/workflows/template.yml
with:
os: ubuntu-latest
python-version: '3.9'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ read-exclusions ]
build-macos-py39:
uses: ./.github/workflows/template.yml
with:
os: macos-13
python-version: '3.9'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ build-ubuntu-py39, read-exclusions ]
build-ubuntu-py38:
uses: ./.github/workflows/template.yml
with:
os: ubuntu-latest
python-version: '3.8'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ read-exclusions ]
build-macos-py38:
uses: ./.github/workflows/template.yml
with:
os: macos-13
python-version: '3.8'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ build-ubuntu-py38, read-exclusions ]
build-ubuntu-py313:
uses: ./.github/workflows/template.yml
with:
os: ubuntu-latest
python-version: '3.13-dev'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ read-exclusions ]
build-macos-py313:
uses: ./.github/workflows/template.yml
with:
os: macos-13
python-version: '3.13-dev'
exclude: ${{ needs.read-exclusions.outputs.BUILD_EXCLUSIONS }}
secrets: inherit
needs: [ build-ubuntu-py313, read-exclusions ]
build-summary:
if: success() || failure()
runs-on: ubuntu-latest
name: Build Summary
needs:
- build-primary
- build-secondary
- build-experimental
- build-ubuntu-py313
- build-macos-py313
- build-ubuntu-py312
- build-macos-py312
- build-ubuntu-py311
- build-macos-py311
- build-ubuntu-py310
- build-macos-py310
- build-ubuntu-py39
- build-macos-py39
- build-ubuntu-py38
- build-macos-py38
steps:
- name: Check build matrix status
if: |
Expand Down
Loading

0 comments on commit 7270569

Please sign in to comment.