Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pypa/setuptools
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ichard26/setuptools
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: pep-660
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Nov 11, 2021

  1. Implement PEP 660 hooks in setuptools/build_meta.py

    I chose the root .pth editable strategy as it "just works" for
    implicit namespace packages and also looked easier haha. While most of
    the code is (hopefully) rather straightforward, it is quite verbose
    as unforunately setuptools doesn't have much in terms of wheel utilties.
    
    There's also a somewhat sketchy hack used to acquire the distribution
    location so I can put the right path to ${dist-name}.pth in the wheel.
    Since the PEP 517 is isolated from the command framework, it's pretty
    hard querying information from the various setup.py commands ran. The
    shim added captures the egg_info instance when setup.py dist_info runs
    so the build_editable hook can query the location (i.e. egg_base).
    
    One limitation of this commit is that the build_editable hook completely
    ignores the metadata_directory parameter and violates the guarantee the
    hook shall produce a (editable) wheel with identical metadata. Given
    that it seems no major backends is currently following through with this
    promise[^1] this is hopefully fine for now?
    
    dholth's work which I referenced extensively:
        https://github.com/dholth/setuptools_pep660
    
    [^1]: https://discuss.python.org/t/nobody-is-following-the-metadata-directory-promise-in-pep-517/6964
    ichard26 committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    0970368 View commit details
    Browse the repository at this point in the history
  2. Steal normalization logic from pypa/wheel

    As it seems to be doing better than what setuptools.dist.Distribution provides
    ichard26 committed Nov 11, 2021
    Configuration menu
    Copy the full SHA
    f6fc994 View commit details
    Browse the repository at this point in the history
Loading