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

Release 1.1: Regression breaks setuptools builds #192

Open
jaraco opened this issue Apr 29, 2024 · 15 comments · May be fixed by #195 or #199
Open

Release 1.1: Regression breaks setuptools builds #192

jaraco opened this issue Apr 29, 2024 · 15 comments · May be fixed by #195 or #199

Comments

@jaraco
Copy link
Member

jaraco commented Apr 29, 2024

In pypa/setuptools#4333, setuptools reports some emergent failures implicating the recent pyproject-hooks 1.1 release.

@jaraco
Copy link
Member Author

jaraco commented Apr 29, 2024

I suspect this change is relevant.

  • More careful handling of the backend-path key from pyproject.toml.
    Previous versions would load the backend and then check that it was loaded
    from the specified path; the new version only loads it from the specified path.
    The BackendInvalid exception is now a synonym for :exc:BackendUnavailable,
    and code should move to using the latter name.

@pradyunsg
Copy link
Member

#165 is the relevant PR -- /cc @abravalheri for awareness.

It's unclear to me what exactly is happening here from the setuptools failure, so not quite sure what the fix should/would be?

@pradyunsg pradyunsg changed the title Regression in 1.1 release breaks setuptools builds Release 1.1: Regression breaks setuptools builds Apr 29, 2024
@jaraco
Copy link
Member Author

jaraco commented Apr 29, 2024

My initial thought is that setuptools' builds were previously relying on metadata from an existing installation... and this change keeps that metadata hidden so that all that's around is the bootstrap metadata, which isn't sufficient to build setuptools (maybe?).

@jaraco
Copy link
Member Author

jaraco commented Apr 29, 2024

Or, maybe the changes to avoid altering sys.path cause the metadata to be missing altogether.

@pradyunsg
Copy link
Member

The sys.path with 1.0.0:

['/Users/pradyunsg/Developer/github/setuptools', '/Users/pradyunsg/Developer/github/setuptools/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process', '/Users/pradyunsg/.asdf/installs/python/3.12.0/lib/python312.zip', '/Users/pradyunsg/.asdf/installs/python/3.12.0/lib/python3.12', '/Users/pradyunsg/.asdf/installs/python/3.12.0/lib/python3.12/lib-dynload', '/Users/pradyunsg/Developer/github/setuptools/.venv/lib/python3.12/site-packages']

The sys.path with 1.1.0:

['/Users/pradyunsg/Developer/github/setuptools/.venv/lib/python3.12/site-packages/pyproject_hooks/_in_process', '/Users/pradyunsg/.asdf/installs/python/3.12.0/lib/python312.zip', '/Users/pradyunsg/.asdf/installs/python/3.12.0/lib/python3.12', '/Users/pradyunsg/.asdf/installs/python/3.12.0/lib/python3.12/lib-dynload', '/Users/pradyunsg/Developer/github/setuptools/.venv/lib/python3.12/site-packages']

It's... suboptimal... that _in_process is on sys.path with this setup.

@pradyunsg
Copy link
Member

Yup, it's the changeover to using sys.meta_path rather than sys.path for loading the backend that's affected things here.

@jaraco
Copy link
Member Author

jaraco commented Apr 29, 2024

I suspect adding a find_distributions (i.e. making it an importlib.metadata.DistributionFinder) will allow it to find the metadata for a backend and will likely address the concern.

@mdagost

This comment was marked as off-topic.

@pradyunsg

This comment was marked as off-topic.

@mdagost

This comment was marked as off-topic.

@mdagost

This comment was marked as off-topic.

@pradyunsg
Copy link
Member

pradyunsg commented Apr 30, 2024

@mdagost That sounds unrelated to this project, and specific to how Poetry is handling its environment and lockfile.

Please, let's keep any further Poetry-specific discussion in the Poetry issue tracker or the other issue in this repo.

@abravalheri abravalheri linked a pull request Apr 30, 2024 that will close this issue
@mdagost
Copy link

mdagost commented Apr 30, 2024

Correct. The root root cause was managing poetry with the lockfile, which is no bueno.

dhellmann added a commit to dhellmann/rebuilding-the-wheel that referenced this issue May 15, 2024
@jacobfriedman
Copy link

CPython should stop shipping with prebuilt pip and invoking an install of prebuilt setuptools. Even Fedora has a problem with this.

@nanonyme
Copy link

@jacobfriedman CPython shipping pip has absolutely nothing to do with this problem, this same issue happens with pyproject stack with no pip and only build+installer.

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