Skip to content

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

Closed

Description

@webknjaz

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.

Activity

  1. webknjaz commented on Sep 9, 2020

    @webknjaz
    MemberAuthor
  2. pfmoore commented on Sep 9, 2020

    @pfmoore
    Member

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

  3. henryiii commented on Jan 27, 2021

    @henryiii
    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.

  4. merwok commented on Feb 9, 2021

    @merwok
    Member

    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.

  5. FFY00 commented on Feb 9, 2021

    @FFY00
    Member

    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.

  6. henryiii commented on Feb 9, 2021

    @henryiii
    Contributor

    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.

  7. henryiii commented on Feb 9, 2021

    @henryiii
    Contributor

    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).

  8. merwok commented on Feb 9, 2021

    @merwok
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions