-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow different options for checking the sdist, e.g. flit build
or build
#15
Comments
flit build
instead of build
flit build
or build
One of the main reasons this exists is due to this horrible bug/design of flit, where standardized tools (like build, build-and-inspect-python-package, etc.) can't build a valid flit-core sdist due to the fact that flit doesn't run flit-core like standardized tools do. What I'd highly recommend doing is fixing flit-core to always include these important files via flit's config. Here's the config in [tool.flit.sdist]
include = ["LICENSE*", "tests/", "docs/", "CHANGELOG.rst"]
exclude = ["docs/_build", "tests/manylinux/build-hello-world.sh", "tests/musllinux/build.sh", "tests/hello-world.c", "tests/__pycache__", "build/__pycache__"] (I'm not totally against this option as long as it was opt-in, but want to point out why I think it's backwards - the point of the tool was to make sure you configure your repo correctly to support any standardized backend following PEP 517 and to catch exactly what you are seeing). |
Ah, got it! Thank you for your help, have a good week! |
Ahh, one more note, was looking at flit-core's changelog for something else:
So it looks like it's really, really a good idea to fix the file inclusion, unless you switch to |
Hi,
thanks for your practical tool, I discovered it through mgedmin/check-manifest#163 while wondering how I can fix my pipeline after having migrated away from a
setup.py
invocated build. I am using flit as build system now and want to useflit build
to build my package, sinceflit build
includes my tests, some examples and the docs in the sdist (whether it belongs there or not seems to be a controversial discussion... https://discuss.python.org/t/should-sdists-include-docs-and-tests/14578/23 I decided to go with it as before, until someone tells me not do to it for good reasons :D).You tool runs
build
which only includes the src directory, pyproject.toml, readme and metadata in the sdist, therefore the check fails because all kinds of source files from the vcs are missing in the sdist. I could use the git-only list to prevent the tool from throwing an error, but since I actually want to check, whether all the files are shipped inside the sdist, I think an option to replace the build commandcheck-sdist/src/check_sdist/sdist.py
Line 14 in d8c9ee5
in some way could be very helpful. What do you think? I have opened a respective PR :).
Best!
The text was updated successfully, but these errors were encountered: