Skip to content

Commit

Permalink
feat: switch to PDM for wheel building
Browse files Browse the repository at this point in the history
- Replace poetry with PDM for building wheels
- Use PDM's --bundle-dependencies to include all dependencies in one wheel
- Convert poetry project to PDM during build
  • Loading branch information
polischuks committed Jan 31, 2025
1 parent 5b8109c commit 6e00664
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,21 +49,25 @@ jobs:

- name: Install build dependencies
run: |
python -m pip install build poetry
python -m pip install pdm
shell: bash

- name: Build wheel
- name: Build wheel with dependencies
run: |
# Install dependencies first to ensure they're available
poetry install
# Convert poetry project to pdm
pdm import poetry pyproject.toml
# Build wheel
python -m build --wheel --no-isolation --outdir dist/
# Build wheel with bundled dependencies
pdm build --no-sdist --wheel --bundle-dependencies
# Move wheels to dist directory
mkdir -p dist
mv dist/*.whl dist/
shell: bash

- name: Build source distribution
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
run: python -m build --sdist --outdir dist/
run: pdm build --no-wheel --sdist
shell: bash

- name: Upload to GitHub Actions
Expand Down

0 comments on commit 6e00664

Please sign in to comment.