-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] On Fedora, install fails with "KeyError: 'posix_local'" #2977
Comments
Is this issue new with Setuptools 60.1 but 60.0.4 is unaffected? Or is the issue new with Setuptools 60.0.x? |
In #2896 (comment), @encukou had some good feedback and analysis (and I welcome assistance here). tl;dr is that Fedora 34 and 35 don't necessarily have the requisite hooks to enable unpatched distutils... so it may be possible/necessary to provide those hooks. If the hooks can't be provided, the best thing may be to universally disable the local setuptools, by globally setting SETUPTOOLS_USE_DISTUTILS=stdlib or by possibly by monkey-patching _distutils_hack to disable it. For Fedora 36, the hooks are meant to be present, so I'd expect the experience to be better. What's a surprise to me is the error message. The |
I just checked and |
Oh. I can see clearly now that |
@jaraco Ummm... I get you point... After update:
So it feel much better now with v60.1.1:
Some positive result:
P.S. @jaraco any idea if we could extend (a bit more) for |
@BKSteve Your issue appears unrelated. Please open a separate issue. |
@hswong3i The plan for Fedora is to avoid the |
I am confused. How is _distutils_system_mod appearing on Fedora? |
This has indeed only been applied to Python 3.10 in Fedora 35. On Fedora 36+ and 3.10+, we no longer patch distutils. The plan is indeed to also patch this in Python 3.9 on Fedora 34. |
@hroncok Sorry this is my miss and case only applied for myself:
Since my build have no relationship with Fedora official packaging, what I need to do is manually fix it as #2977 (comment) |
That's the " |
Right. The update https://bodhi.fedoraproject.org/updates/FEDORA-2021-f9dded110a has been pushed to stable 18 hours ago. I don't really know how often fedora:35 is regenerated, but
|
Amazing! Yes, I can confirm the issue is fixed: FROM fedora:35
RUN dnf -y update
RUN dnf -y install git curl wget fdupes python3 python3-devel rpmdevtools gcc glibc-static
RUN rpmdev-setuptree
WORKDIR /root/rpmbuild/SOURCES/
RUN git clone -b alvistack/v60.1.0 https://github.com/alvistack/pypa-setuptools.git
WORKDIR pypa-setuptools
RUN find *.spec debian/rules -type f | xargs sed -i 's/export SETUPTOOLS_USE_DISTUTILS=stdlib && //g'
RUN git clean -xdf
RUN tar zcvf ../python-setuptools_60.1.0.orig.tar.gz --exclude=.git .
RUN cp -rfp python-setuptools.spec /root/rpmbuild/SPECS/python-setuptools_60.1.0-1.spec
CMD rpmbuild -ba /root/rpmbuild/SPECS/python-setuptools_60.1.0-1.spec Using that dockerfile, it failed to run due to a cached earlier update. When I re-ran it without the cache, it ran to completion without error. I presume that solves this issue, so I'll close the bug, but happy to re-open if needed. @hswong3i Please confirm that this addresses the issue or if there's more investigation needed. |
setuptools version
60.1.0
Python version
Python 3.10.1
OS
Fedora 35
Additional environment information
Running RPM packaging with rpmbuild.
Description
Similar as #2956, Fedora 34+ now require
SETUPTOOLS_USE_DISTUTILS=stdlib
for building correctly.Expected behavior
For v60.1.0 WITH
SETUPTOOLS_USE_DISTUTILS=stdlib
it is OK:How to Reproduce
For setuptools 60.1.0 WITHOUT
SETUPTOOLS_USE_DISTUTILS=stdlib
it is FAILED:Output
Code of Conduct
The text was updated successfully, but these errors were encountered: