Skip to content

Fix packaging: SPDX license, drop ez_setup, ship complete test sdist (#368, #343)#369

Merged
AndreyVMarkelov merged 2 commits into
mainfrom
fix-packaging-license-and-sdist-tests
Jul 10, 2026
Merged

Fix packaging: SPDX license, drop ez_setup, ship complete test sdist (#368, #343)#369
AndreyVMarkelov merged 2 commits into
mainfrom
fix-packaging-license-and-sdist-tests

Conversation

@AndreyVMarkelov

@AndreyVMarkelov AndreyVMarkelov commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Fixes two packaging issues.

#368 — License classifier deprecation warning

Building a wheel with setuptools >= 77 emitted:

SetuptoolsDeprecationWarning: License classifiers are deprecated.
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License

Per PEP 639:

  • Replace license='MIT License' with license_expression='MIT', producing the canonical License-Expression: MIT metadata field.
  • Remove the deprecated License :: OSI Approved :: MIT License classifier.
  • Add a minimal pyproject.toml pinning setuptools>=77 so the build backend understands the SPDX expression.
  • With build isolation now guaranteeing setuptools is present, the legacy ez_setup.py bootstrap is dead code — removed it and its references in setup.py, MANIFEST.in, and mypy-run.sh.

#343ModuleNotFoundError: No module named 'test.backend_test_util'

The sdist shipped 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. Running pytest against the PyPI source tarball failed at collection.

The test files were only pulled in by setuptools' default test*.py glob, which misses __init__.py and helper modules. Added recursive-include test *.py so 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

  • Built sdist + wheel with setuptools 82.0.1 (the reporters' version) — no deprecation warning.
  • Wheel metadata: License-Expression: MIT, no license classifier; wheel ships 0 test files.
  • Extracted the sdist and ran the full suite from the tarball — 181 passed, zero collection errors (reproduces and fixes test failure: No module named 'test.backend_test_util' #343).

…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.
@AndreyVMarkelov AndreyVMarkelov merged commit 1b7a327 into main Jul 10, 2026
11 checks passed
@AndreyVMarkelov AndreyVMarkelov deleted the fix-packaging-license-and-sdist-tests branch July 10, 2026 16:20
AndreyVMarkelov added a commit that referenced this pull request Jul 10, 2026
Release the packaging fixes from #369: SPDX license expression and
ez_setup removal (#368), and shipping a complete test package in the
sdist (#343).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test failure: No module named 'test.backend_test_util'

2 participants