Skip to content

Include tests in the source distribution - #424

Merged
alex merged 1 commit into
certifi:masterfrom
alexchen-sys:fix/include-tests-in-sdist-226
Jul 16, 2026
Merged

alex merged 1 commit into
certifi:masterfrom
alexchen-sys:fix/include-tests-in-sdist-226

Conversation

@alexchen-sys

Copy link
Copy Markdown
Contributor

Summary

certifi/tests already lives in the repository, but MANIFEST.in only listed package data files (cacert.pem, py.typed, etc.). Source distributions therefore shipped without the test suite, which makes downstream sdist testing harder (#226).

Changes

  • Add recursive-include certifi/tests * so the suite is packaged in the sdist.
  • Add global-exclude *.py[cod] __pycache__ .DS_Store so local bytecode is not pulled into the archive when tests are included.

Test plan

  • python3 setup.py sdist — archive lists certifi/tests/__init__.py and certifi/tests/test_certify.py, no __pycache__.
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python3 -W error -m pytest -q from git tree: 3 passed.
  • Same pytest command from the extracted sdist root: 3 passed.
  • python3 -m unittest discover -s certifi/tests -v from extracted sdist: 3 OK.

Closes #226

The repository already ships certifi/tests, but MANIFEST.in only
listed package data files, so sdist builds omitted the suite.
Add a recursive-include so downstream can test from the sdist.

Closes #226

Signed-off-by: Alex Chen <l46983284@gmail.com>
@alex
alex merged commit 474e6fc into certifi:master Jul 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants