Skip to content

Commit 76a8c16

Browse files
arman-bdclaude
andcommitted
fix: disable automatic LICENSE file inclusion to fix PyPI upload
PyPI was rejecting uploads with error: "Invalid distribution metadata: unrecognized or malformed field 'license-file'" Root cause: Setuptools was automatically adding a deprecated 'license-file' metadata field when it detected a LICENSE file in the repository root. PyPI no longer accepts this field format. Solution: Explicitly set license-files = [] in [tool.setuptools] to prevent automatic LICENSE file inclusion in wheel metadata. The license is still properly declared via license = {text = "MIT"} in the [project] section. Also updated release workflow to build for all Python versions 3.8-3.14. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 678e63f commit 76a8c16

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.github/workflows/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
6363
# Python versions to test
6464
PYTHON_MATRIX='[
65-
"3.8"
65+
"3.8", "3.11", "3.14"
6666
]'
6767
# Python versions: "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"
6868

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
2222
# Test matrix configuration (only used if run-tests is 'true')
2323
echo 'os-matrix=["ubuntu-latest", "macos-latest", "windows-latest"]' >> $GITHUB_OUTPUT
24-
echo 'python-matrix=["3.9", "3.10", "3.11", "3.12"]' >> $GITHUB_OUTPUT
24+
echo 'python-matrix=["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]' >> $GITHUB_OUTPUT
2525
2626
test:
2727
name: Run Tests

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ Issues = "https://github.com/arman-bd/httpmorph/issues"
6767
[tool.setuptools]
6868
packages = ["httpmorph"]
6969
package-dir = {"" = "src"}
70+
# Don't automatically include LICENSE file (causes PyPI upload issues)
71+
license-files = []
7072

7173
[tool.setuptools.package-data]
7274
httpmorph = ["*.pyx", "*.pxd", "*.c", "*.h"]

0 commit comments

Comments
 (0)