Bug 2011899 - `/usr/lib64/python3.10/site-packages` not included in path even with globalsitepackages enabled
Summary: `/usr/lib64/python3.10/site-packages` not included in path even with globalsi...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: pew
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tadej Janež
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-07 16:30 UTC by Ankur Sinha (FranciscoD)
Modified: 2023-08-16 07:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github berdario pew issues 227 0 None open /usr/lib64/python3.10/site-packages not included in sys.path even with globalsitepackages enabled 2022-02-14 21:39:17 UTC

Description Ankur Sinha (FranciscoD) 2021-10-07 16:30:32 UTC
Description of problem:
I noticed that my global python packages were not accessible in a pew environment, even after I'd run pew toggleglobalsitepackages to enable this.

On inspection, i see that the path included is `/usr/lib64/python3.10` but not `/usr/lib64/python3.10/site-packages`.

I wonder if this is a tweak that needs to be made in pew?

Version-Release number of selected component (if applicable):
$ pew version
1.2.0

$ rpm -q pew
pew-1.2.0-13.fc35.noarch


How reproducible:
Always

Steps to Reproduce:
1. Create new env with pew: `pew new test`
2. Check path: 

$ python3 -c "import sys; print(sys.path)"
['', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '/home/asinha/.local/share/virtualenvs/test/lib64/python3.10/site-packages', '/home/asinha/.local/share/virtualenvs/test/lib/python3.10/site-packages']


3. Toggle globalsitepackages to check they're enableD:

$ pew toggleglobalsitepackages
Disabled global site-packages

$ pew toggleglobalsitepackages
Enabled global site-packages

4. Check path again:

$ python3 -c "import sys; print(sys.path)"
['', '/usr/lib64/python310.zip', '/usr/lib64/python3.10', '/usr/lib64/python3.10/lib-dynload', '/home/asinha/.local/share/virtualenvs/test/lib64/python3.10/site-packages', '/home/asinha/.local/share/virtualenvs/test/lib/python3.10/site-packages']


Actual results:
`/usr/lib64/python3.10/site-packages` is not in sys.path.

Expected results:
Should `/usr/lib64/python3.10/site-packages` not be in path when global site packages are enabled?


Additional info:
Workaround is to tweak PYTHONPATH manually:

PYTHONPATH="$PYTHONPATH:/usr/lib64/python3.10/site-packages" ...

Comment 1 Ankur Sinha (FranciscoD) 2021-10-29 09:40:15 UTC
@tadej.j I looked at the upstream issues and this does not seem to be filed there, so now I'm unsure of if it really is an issue.

Could you please take a look when you have a minute? I'm happy to provide more info etc. if that'll help fix this (can even do a patch if possible, but I haven't looked at the pew sources yet).

Thanks very much for getting pew back in to Fedora---very very useful :)

Comment 2 Ben Cotton 2022-02-08 21:36:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 36 development cycle.
Changing version to 36.

Comment 3 Tadej Janež 2022-02-14 21:39:17 UTC
Thanks @sanjay.ankur 

I was able to reproduce the issue so I've reported it to upstream: https://github.com/berdario/pew/issues/227.

Comment 4 Ben Cotton 2023-04-25 16:45:11 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 5 Fedora Release Engineering 2023-08-16 07:05:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


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