RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1686810 - AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
Summary: AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: python-setuptools
Version: 8.0
Hardware: x86_64
OS: Linux
low
unspecified
Target Milestone: rc
: 8.0
Assignee: Python Maintainers
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
: 1726274 (view as bug list)
Depends On: 1679630
Blocks: 1726274
TreeView+ depends on / blocked
 
Reported: 2019-03-08 11:29 UTC by Petr Viktorin (pviktori)
Modified: 2019-08-13 13:16 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1679630
: 1726274 (view as bug list)
Environment:
Last Closed: 2019-08-13 13:07:20 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github pypa pip issues 6264 0 None open Virtualenv with --system-site-packages breaks pip's build isolation 2020-11-16 14:59:22 UTC

Description Petr Viktorin (pviktori) 2019-03-08 11:29:42 UTC
+++ This bug was initially created as a clone of Bug #1679630 +++

Description of problem:
Can't install local package with pip3 install -e
For more information see https://github.com/pypa/setuptools/issues/1694

Version-Release number of selected component (if applicable):
setuptools-40.4.3

How reproducible:
See https://github.com/pypa/setuptools/issues/1694

Actual results:
Obtaining file:///home/vagrant/devel
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  Complete output from command /home/vagrant/.virtualenvs/anitya/bin/python3 /home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmp6db90a_q:
  Traceback (most recent call last):
    File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 48, in get_requires_for_build_wheel
      backend = _build_backend()
    File "/home/vagrant/.virtualenvs/anitya/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 39, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'

Expected results:
The package is installed

Additional info:
According to the https://github.com/pypa/setuptools/issues/1694 the version 40.8.0 of setuptools should solve this.

--- Additional comment from Miro Hrončok on 2019-02-21 17:43:34 CET ---

Can you workaround this by updating both pip and setuptools in your virtual environment?

Anyway, updating to 40.8.0 is technically possible (we have that version in F30), but somebody would need to check if there are no backwards incompatible changes.

--- Additional comment from Michal Konecny on 2019-02-21 18:11:01 CET ---

Yes, I can workaround this when I don't use --system-site-packages flag when creating virtual environment.

But still this is something that could hit plenty of Fedora users.

--- Additional comment from Miro Hrončok on 2019-02-21 18:43:19 CET ---

Can you workaround this by updating both pip and setuptools in your virtual environment even if you use --system-site-packages?

(I'm asking because I want to understand this problem better, I'm not trying to talk myself out of fixing it.)

--- Additional comment from Miro Hrončok on 2019-02-21 18:56:30 CET ---

(Reading the upstream issue, I assume the answer is no.)

This is the most important issue: https://github.com/pypa/pip/issues/6264

Upstream pip is broken, but Fedora users will get it in venv via explicit update or in virtualenv (fetches newest version by default).

We should really update setuptools if it is at least bit possible.

--- Additional comment from Michal Konecny on 2019-02-22 09:12:20 CET ---

It doesn't work if you have newest version of setuptools in virtual environment and using --system-site-packages.

I have setuptools 40.8.0 in virtual environment and still experiencing this issue.

[...]

--- Additional comment from Miro Hrončok on 2019-02-27 01:10:39 CET ---

https://src.fedoraproject.org/rpms/python-setuptools/pull-request/17
https://src.fedoraproject.org/rpms/python-setuptools/pull-request/18

[...]

Comment 5 Charalampos Stratakis 2019-05-07 13:30:08 UTC
This is still low priority

Comment 6 Charalampos Stratakis 2019-05-07 13:30:39 UTC
Correction: Moving it to low priority

Comment 7 Petr Viktorin (pviktori) 2019-08-13 13:07:20 UTC
Upstream is aware of the issue, and we don't have capacity to work on this from our side.
If we get a customer report, let's reopen.

Comment 8 Petr Viktorin (pviktori) 2019-08-13 13:16:24 UTC
*** Bug 1726274 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.