Skip to content
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

pyproject.toml should be included in sdist by default #1632

Closed
pganssle opened this issue Jan 8, 2019 · 3 comments · Fixed by #1650
Closed

pyproject.toml should be included in sdist by default #1632

pganssle opened this issue Jan 8, 2019 · 3 comments · Fixed by #1650

Comments

@pganssle
Copy link
Member

pganssle commented Jan 8, 2019

An issue came up at work recently where installing python-daemon with pip was hitting the easy_install path. I assumed it was because python-daemon didn't have a pyproject.toml, but it turns out they do - it's just not included in the Manifest.in, so it didn't get included in the sdist. To verify this I created a super basic example project and it does seem that the default is to exclude pyproject.toml.

Given that pyproject.toml is one of the most important files to have when executing a build, it should be included in the sdist unless explicitly excluded.

@pganssle pganssle added enhancement Needs Implementation Issues that are ready to be implemented. labels Jan 8, 2019
daa added a commit to daa/setuptools that referenced this issue Jan 11, 2019
@daa
Copy link
Contributor

daa commented Jan 11, 2019

I think the same issue should be put into Python bugtracker for distutils to include pyproject.toml by default.

@pganssle
Copy link
Member Author

@daa I think at this point new changes like this are not likely to be accepted in distutils, but you are welcome to open an issue. Generally the guidance is to use setuptools.

@jaraco jaraco reopened this Jan 27, 2019
pganssle pushed a commit to pganssle/setuptools that referenced this issue Jan 27, 2019
@pganssle pganssle added deferred and removed Needs Implementation Issues that are ready to be implemented. labels Feb 22, 2019
@uranusjr
Copy link
Member

uranusjr commented Dec 27, 2019

From PEP 517:

build_sdist

[…] A .tar.gz source distribution (sdist) contains a single top-level directory […]. This directory must also contain the pyproject.toml from the build directory, and a PKG-INFO file containing metadata in the format described in PEP 345.

So at least sdists built through build_meta must contain pyproject.toml. It is still debatable whether setup.py sdist (which is not restricted by PEP 517) should do this by default though.

Should I file a PR to special-case build_meta.build_sdist? As it stands Setuptools is not technically compliant to PEP 517. (Edit: I already did.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants