Skip to content

Commit 483b8bc

Browse files
committed
fix(packaging): support wheels built from source distributions
1 parent fa02f76 commit 483b8bc

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,13 @@ jobs:
201201
with:
202202
python-version: "3.11"
203203

204-
- name: Build and install wheel
204+
- name: Build sdist and install its wheel
205205
run: |
206206
python -m pip install --upgrade pip build
207207
test ! -e src/adcp/_schemas
208-
python -m build --wheel --outdir dist/
208+
# The default build path creates the sdist first, then builds the
209+
# wheel from that sdist. This covers both VCS and sdist consumers.
210+
python -m build --outdir dist/
209211
pip install dist/*.whl
210212
211213
- name: Verify VCS-built wheel schemas

MANIFEST.in

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ recursive-include src/adcp/_schemas/3.0 *.json
1212
recursive-include src/adcp/_schemas/3.1 *.json
1313
recursive-include src/adcp/_schemas/3.2.0-beta.10 *.json
1414
prune src/adcp/_schemas/3.1.0-*
15+
# A clean VCS source tree has no ignored ``src/adcp/_schemas`` directory.
16+
# Keep the tracked inputs needed by the build_py hook in source distributions
17+
# so wheels built from an sdist have the same schema set as direct VCS wheels.
18+
recursive-include schemas/cache/2.5 *.json
19+
recursive-include schemas/cache/3.0 *.json
20+
recursive-include schemas/cache/3.1 *.json
21+
recursive-include schemas/cache/3.2.0-beta.10 *.json

0 commit comments

Comments
 (0)