| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
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. 🙂 |
Sorry, something went wrong.
So, it takes a tad more to make this work on a folder unpacked from a git archive. After unpacking the archived repository — as the thread hints — we need to git init the repo and we also need to git add all the existing files to make pre-commit work (otherwise it won’t know of any files). |
Sorry, something went wrong.
…ck and test the code, and to build the documentation as well
|
@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 SOURCE_DATE_EPOCH (docs) we’re able to produce a wheel from the sdist: /tmp/sdist/package-2.18.0 > md5sum dist/package-2.18.0.tar.gz dist/package-2.18.0-py3-none-any.whl 4310f1af61875f87d41a190aa15a85ac dist/package-2.18.0.tar.gz defaca1183be751636599c050ca5ce05 dist/package-2.18.0-py3-none-any.whl that’s bit-exactly the same wheel as the original built from the source repository: ~/opt/dev/python-package-template > md5sum dist/package-2.18.0.tar.gz dist/package-2.18.0-py3-none-any.whl 0f06a8346c1ca3ce20b1fa11f16c0bed dist/package-2.18.0.tar.gz defaca1183be751636599c050ca5ce05 dist/package-2.18.0-py3-none-any.whl The sdist files do not match, however, because “reproducible” applies to wheels only. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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