Fix packaging: SPDX license, drop ez_setup, ship complete test sdist (#368, #343)#369
Merged
Merged
Conversation
…368, #343) Two packaging fixes: Building a wheel with setuptools >= 77 emitted a SetuptoolsDeprecationWarning because the license was declared via the deprecated 'License :: OSI Approved :: MIT License' classifier. Per PEP 639, replace it with the SPDX license_expression 'MIT' and remove the classifier. Add a minimal pyproject.toml pinning setuptools >= 77 so the build backend understands the expression. With build isolation now guaranteeing setuptools is present, the legacy ez_setup.py bootstrap is dead code, so remove it and its references in setup.py, MANIFEST.in, and mypy-run.sh. The sdist included test/test_js_client.py and test/test_tsd_types.py, which import `from test.backend_test_util import _mock_output`, but neither test/__init__.py nor test/backend_test_util.py were packaged, so pytest against the PyPI source tarball failed at collection with ModuleNotFoundError. The test files were only pulled in by setuptools' default test*.py glob, which misses __init__.py and helper modules. Add `recursive-include test *.py` so the entire test package ships and the suite runs cleanly from the sdist. Repository checkouts were unaffected and wheels do not ship tests, so end users were never impacted.
cguldner
approved these changes
Jul 10, 2026
Closed
This was referenced Jul 10, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes two packaging issues.
#368 — License classifier deprecation warning
Building a wheel with setuptools >= 77 emitted:
Per PEP 639:
license='MIT License'withlicense_expression='MIT', producing the canonicalLicense-Expression: MITmetadata field.License :: OSI Approved :: MIT Licenseclassifier.pyproject.tomlpinningsetuptools>=77so the build backend understands the SPDX expression.ez_setup.pybootstrap is dead code — removed it and its references insetup.py,MANIFEST.in, andmypy-run.sh.#343 —
ModuleNotFoundError: No module named 'test.backend_test_util'The sdist shipped
test/test_js_client.pyandtest/test_tsd_types.py, which importfrom test.backend_test_util import _mock_output, but neithertest/__init__.pynortest/backend_test_util.pywere packaged. Runningpytestagainst the PyPI source tarball failed at collection.The test files were only pulled in by setuptools' default
test*.pyglob, which misses__init__.pyand helper modules. Addedrecursive-include test *.pyso the entire test package ships.Repository checkouts were unaffected (files exist locally) and wheels do not ship tests, so end users were never impacted — this only affected packagers running the suite from the source tarball.
Validation
License-Expression: MIT, no license classifier; wheel ships 0 test files.