Skip to content

sdist: include misc/{diff-cache,apply-cache-diff}.py for mypy/test/test_diff_cache.py#21096

Merged
JukkaL merged 1 commit intopython:masterfrom
mr-c:sdist_include_cache_scripts
Mar 26, 2026
Merged

sdist: include misc/{diff-cache,apply-cache-diff}.py for mypy/test/test_diff_cache.py#21096
JukkaL merged 1 commit intopython:masterfrom
mr-c:sdist_include_cache_scripts

Conversation

@mr-c
Copy link
Contributor

@mr-c mr-c commented Mar 24, 2026

In Debian, we build the mypy Debian package from the Python package source dists published to https://pypi.org/project/mypy/ ; so to support running the mypy/test/test_diff_cache.py tests, include misc/{diff-cache,apply-cache-diff}.py in the MANIFEST.in

@mr-c
Copy link
Contributor Author

mr-c commented Mar 24, 2026

To confirm this PR

$ python3 -m build --sdist
$ tar tf dist/mypy*.tar.gz | grep 'misc/'
mypy-1.20.0+dev.7528f132eee6c3686ff9b2b685e7631af4cf83d4/misc/
mypy-1.20.0+dev.7528f132eee6c3686ff9b2b685e7631af4cf83d4/misc/apply-cache-diff.py
mypy-1.20.0+dev.7528f132eee6c3686ff9b2b685e7631af4cf83d4/misc/diff-cache.py

@github-actions

This comment has been minimized.

@JukkaL
Copy link
Collaborator

JukkaL commented Mar 24, 2026

Did you check if the scripts work when distributed like this (i.e. can the imports be resolved)?

@mr-c
Copy link
Contributor Author

mr-c commented Mar 24, 2026

Did you check if the scripts work when distributed like this (i.e. can the imports be resolved)?

Yes

Both at build time: https://debusine.debian.net/debian/developers/artifact/3476216/raw/mypy_1.20.0~1dev.7528f132eee6c3686ff9b2b685e7631af4cf83d4-1_amd64-2026-03-24T10:59:04Z.build ( search for -m pytest)
And post-installation: https://debusine.debian.net/debian/developers/artifact/3476260/#L1146-section

@mr-c
Copy link
Contributor Author

mr-c commented Mar 24, 2026

this PR only adds the scripts to the source distribution, not the wheel

@mr-c mr-c force-pushed the sdist_include_cache_scripts branch from 7528f13 to 9a9d686 Compare March 26, 2026 09:27
@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 9790459 into python:master Mar 26, 2026
24 checks passed
@mr-c mr-c deleted the sdist_include_cache_scripts branch March 26, 2026 12:20
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.

2 participants