fix: the generated sdist file should contain everything needed to check and test the code, and to build the documentation as well#967
Conversation
|
I think most of your Makefile is usable without a git repo - and even pre-commit config can be used by creating a new blank git repo (that's really what pre-commit maintainers suggest 🤷 ). So I'd be inclined to leave them in the sdist. But it's definitely a matter of taste, once you go beyond the tests & docs that downstream packagers typically expect. 🙂 |
So, it takes a tad more to make this work on a folder unpacked from a After unpacking the archived repository — as the thread hints — we need to |
…ck and test the code, and to build the documentation as well
098bcd1 to
64be104
Compare
|
@behnazh @takluyver I finally got around to this PR again. Following Thomas’s advice the sdist now contains everything needed build a wheel (and another sdist). Furthermore, by setting that’s bit-exactly the same wheel as the original built from the source repository: The sdist files do not match, however, because “reproducible” applies to wheels only. |
This change supersedes PR #948 based on discussion pypa/flit#745, and contributes to PR #952.
The generated sdist file now contains these files:
This is essentially a git archive of the folder allowing somebody to build the package and documentation, to run all code checks, and to run the tests.
However, because this generated archive is not a git folder but our development process assumes both git and pre-commit, the archive doesn’t quite work out of the box. I think it would be ok to remove Makefile and .pre-commit-config.yaml, and let the user figure out the rest?
Tagging @takluyver