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

[BUG] 71.0.0 fails PyInstaller builds #4477

Closed
amotl opened this issue Jul 18, 2024 · 5 comments
Closed

[BUG] 71.0.0 fails PyInstaller builds #4477

amotl opened this issue Jul 18, 2024 · 5 comments
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.

Comments

@amotl
Copy link

amotl commented Jul 18, 2024

setuptools version

setuptools==71.0.0

Python version

Python 3.12

OS

Linux, macOS, Windows

Additional environment information

No response

Description

CI jobs started tripping when using setuptools 71, released two hours ago.

Expected behavior

CI builds work as expected.

How to Reproduce

No reproducer yet, but a stacktrace on GHA.

Output

PyInstaller.exceptions.ImportErrorWhenRunningHook: 
Failed to import module __PyInstaller_hooks_0_importlib_metadata required by hook for module 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/PyInstaller/hooks/hook-importlib_metadata.py.

Please check whether module __PyInstaller_hooks_0_importlib_metadata actually exists and whether
the hook is compatible with your version of 
/opt/hostedtoolcache/Python/3.12.4/x64/lib/python3.12/site-packages/PyInstaller/hooks/hook-importlib_metadata.py:
You might want to read more about hooks in the manual and provide a pull-request to improve PyInstaller.

-- https://github.com/crate/cratedb-toolkit/actions/runs/9983011865/job/27589798960?pr=201#step:5:198

@jaraco
Copy link
Member

jaraco commented Jul 18, 2024

It's quite possible that a pyinstaller build might need to be re-customized for Setuptools 71 with its new vendoring approach.

I'm not sure how to interpret that output. For example, where does __PyInstaller_hooks_0_importlib_metadata come from? I wouldn't know the first step in trying to replicate the issue. One possible workaround may be to "install" Setuptools' dependencies as declared here.

bashonly added a commit to bashonly/yt-dlp that referenced this issue Jul 18, 2024
@bashonly
Copy link

One possible workaround may be to "install" Setuptools' dependencies as declared here.

Installing setuptools[core] does indeed workaround the issue, at least in my workflow

@jaraco
Copy link
Member

jaraco commented Jul 18, 2024

One possible workaround may be to "install" Setuptools' dependencies as declared here.

Installing setuptools[core] does indeed workaround the issue, at least in my workflow

That's great news!

FYI - reliance on setuptools[core] directly is not supported. I expect that extra to be moved to default dependencies in the future. Just be aware that core is an internal detail that might change.

@bashonly
Copy link

bashonly commented Jul 18, 2024

71.0.2 resolves this for me. Seems like the root cause of the issue is what's described in #4480 (comment) and #4482 (which was opened by a pyinstaller maintainer)

@jaraco
Copy link
Member

jaraco commented Jul 18, 2024

FYI - reliance on setuptools[core] directly is not supported. I expect that extra to be moved to default dependencies in the future. Just be aware that core is an internal detail that might change.

Correction - setuptools[core] is fine for incidental use. It's just not to be used by package maintainers in the build-requires.

@jaraco jaraco closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Triage Issues that need to be evaluated for severity and status.
Projects
None yet
Development

No branches or pull requests

3 participants