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

Redirect any pep517 package porcelain commands references to python-build #770

Closed
webknjaz opened this issue Sep 9, 2020 · 8 comments
Closed

Comments

@webknjaz
Copy link
Member

webknjaz commented Sep 9, 2020

We have to review all the repo contents for any recommendations to use python -m pep517.build or its variations. It's got popular because it was the only way to invoke PEP517 build backends while pip only has a CLI subcommand for building wheels but not sdists.
It is now being deprecated and the official recommendation is to point folks to python-build instead. This project is in the progress of transitioning under PyPA but is already quite usable.

One place using pep517.build that I know of is https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ but there may be more.

See the discussion @ pypa/pyproject-hooks#83 for more details.

@webknjaz
Copy link
Member Author

webknjaz commented Sep 9, 2020

cc @FFY00

@pfmoore
Copy link
Member

pfmoore commented Sep 9, 2020

Searching the repo, that's the only occurrence (from #647)

@henryiii
Copy link
Contributor

This is closable now, fixed by pypa/setuptools#2519. #817 would update one of the setup.py builds with python -m build, as well.

@di di closed this as completed Jan 28, 2021
@merwok
Copy link
Contributor

merwok commented Feb 9, 2021

Can I ask why the guide uses pep517/python-build and not pip?

If I remember correctly, python-build is meant to be a reference implementation of an installer following PEP 517 and 518. I am not using it myself because I use virtualenvs and pip. Problem reports are starting to show up: https://github.com/pypa/packaging-problems/issues?q=is%3Aissue+is%3Aopen+%22python3+-m+build+%22

From the tracebacks, I see that python-build calls pip, so I find this situation unclear.

@FFY00
Copy link
Member

FFY00 commented Feb 9, 2021

pip cannot build sdists AFAIK. pypa/build calls pip when setting up an isolated environment to then build the packages, but the building step does not involve pip in any way, it is just the means to provision the environment. In fact, pypa/build using pip is just an implementation detail, it could change the way it provisions the isolated environments any time.

I hope that was clear, but if it wasn't please let me know.

@henryiii
Copy link
Contributor

henryiii commented Feb 9, 2021

Pip is a package installer, not a package builder. There's no way to make an SDist through pip, as well. pypa/build does call pip to install packages. There's a bug in the tutorial that would be fixed by #823, but that's not merged yet.

@henryiii
Copy link
Contributor

henryiii commented Feb 9, 2021

With the exception of the issue that was due to a bug in build 0.2.0 fixed in 0.2.1, those issues are not related to build, really, but issues primarily with a missing line in the example (that I'm trying to get fixed in #823).

@merwok
Copy link
Contributor

merwok commented Feb 9, 2021

Pip is a package installer, not a package builder.

Glad to hear that! There wasn’t a general agreement about that for years.

There's no way to make an SDist through pip, as well.

The future is here!

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

No branches or pull requests

6 participants