Skip to content

Commit a04b1c8

Browse files
ratalclaude
andcommitted
fix: definitive PyPI metadata fix - license_files in [metadata] + pyproject.toml build-system only
Root cause: license_files= was in [options] section of setup.cfg (silently ignored). Must be in [metadata] section where ConfigMetadataHandler reads it. pyproject.toml with [build-system] only (no [project]) is safe alongside setup.py - this is the standard pattern used by lxml, numpy, etc. packaging>=24.2 in twine install handles License-File field correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f9e1098 commit a04b1c8

5 files changed

Lines changed: 11 additions & 13 deletions

File tree

.github/workflows/release-linux.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ jobs:
2323
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
2424
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
2525
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
26-
CIBW_BEFORE_BUILD: pip install setuptools numpy cython
27-
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
2826
CIBW_TEST_COMMAND: python -c "import mdfreader"
2927
- uses: actions/upload-artifact@v4
3028
with:
@@ -45,5 +43,5 @@ jobs:
4543
TWINE_USERNAME: __token__
4644
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
4745
run: |
48-
pip install twine
46+
pip install twine "packaging>=24.2"
4947
twine upload dist/* --skip-existing

.github/workflows/release-macos.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
env:
1515
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
1616
CIBW_ARCHS: x86_64 arm64
17-
CIBW_BEFORE_BUILD: pip install setuptools numpy cython
18-
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
1917
CIBW_TEST_COMMAND: python -c "import mdfreader"
2018
- uses: actions/upload-artifact@v4
2119
with:
@@ -35,5 +33,5 @@ jobs:
3533
TWINE_USERNAME: __token__
3634
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
3735
run: |
38-
pip install twine
36+
pip install twine "packaging>=24.2"
3937
twine upload dist/* --skip-existing

.github/workflows/release-windows.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ jobs:
1313
uses: pypa/cibuildwheel@v2.22
1414
env:
1515
CIBW_BUILD: "cp39-win_amd64 cp310-win_amd64 cp311-win_amd64 cp312-win_amd64 cp313-win_amd64"
16-
CIBW_BEFORE_BUILD: pip install setuptools numpy cython
17-
CIBW_BUILD_FRONTEND: "pip; args: --no-build-isolation"
1816
CIBW_TEST_COMMAND: python -c "import mdfreader"
1917
- uses: actions/upload-artifact@v4
2018
with:
@@ -34,5 +32,5 @@ jobs:
3432
TWINE_USERNAME: __token__
3533
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
3634
run: |
37-
pip install twine
35+
pip install twine "packaging>=24.2"
3836
twine upload dist/* --skip-existing

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=68", "Cython>=3.0", "numpy>=1.14"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
[bdist_wheel]
2-
universal=1
1+
[metadata]
2+
license_files =
3+
34
[build_ext]
45
inplace=1
6+
57
[options]
68
setup_requires = cython
7-
license_files =
89

910
[tool:pytest]
1011
testpaths = mdfreader/tests
@@ -14,4 +15,4 @@ markers =
1415
compare_mdfr: cross-validates mdfreader vs mdfr Rust library (run with -m compare_mdfr)
1516
tmp_path_retention_count = 1
1617
tmp_path_retention_policy = failed
17-
tmp_path_base_dir = /home/ratal/workspace/mdfreader/.pytest_tmp
18+
tmp_path_base_dir = /home/ratal/workspace/mdfreader/.pytest_tmp

0 commit comments

Comments
 (0)