LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-20-2021, 04:48 AM   #1
alijkl
LQ Newbie
 
Registered: Nov 2021
Posts: 1

Rep: Reputation: Disabled
warnings in pip may be a bug in cpython package build patch


Hello,

Some time ago I gave python3.10 a try on my slackware64-current box and noticed an issue with pip --user.
As it was not usable without custom setting I raised a bug with the warning provided python pip.

One of the maintainer had a look and I cut and past his reply (should be visible on github too).

now moved to: https://github.com/pypa/pip/issues/10668

I don't know how to reply the last question and what it the proper way to report a bug. Any help will be much appreciated.

thanks

-------
I just verified—this is (arguably) a bug in Slackware’s CPython patch. It patches sysconfig like this:

'posix_user': {
'stdlib': '{userbase}/{platlibdir}/python{py_version_short}',
'platstdlib': '{userbase}/{platlibdir}/python{py_version_short}',
'purelib': '{userbase}/lib64/python{py_version_short}/site-packages',
'platlib': '{userbase}/{platlibdir}/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
},

These are the corresponding lines in upstream CPython for comparison:

https://github.com/python/cpython/bl...fig.py#L69-L77

The difference is Slackware’s Python patches purelib to use lib64 instead of lib. This is OK on its own, but Slackware needs to but did not also patch site to match this:

chung@darkstar:~$ python3 -m site
sys.path = [
'/home/chung',
'/usr/lib64/python39.zip',
'/usr/lib64/python3.9',
'/usr/lib64/python3.9/lib-dynload',
'/home/chung/.local/lib/python3.9/site-packages',
'/usr/lib64/python3.9/site-packages',
]
USER_BASE: '/home/chung/.local' (exists)
USER_SITE: '/home/chung/.local/lib/python3.9/site-packages' (exists)
ENABLE_USER_SITE: True

which causes the warning because pip correctly detects that packages installed to the incorrectly patches sysconfig locations will work (because the incorrect path is not in USER_SITE or sys.path). So Slackware should either patch site, or remove the posix_user patch in sysconfig. Fedora had a similar issue and chose to do the latter, see bpo-44860.

So the bottom line is Slackware should fix this bug. In the meantime though, I’ll submit a patch in pip to detect and slience the warning since there’s nothing pip can do in this situation.
 
Old 11-20-2021, 11:07 AM   #2
brobr
Member
 
Registered: Oct 2003
Location: uk
Distribution: Slackware
Posts: 977

Rep: Reputation: 239Reputation: 239Reputation: 239
You could put a note of this in the thread, Requests for -current (14.2-->15.0) and it might be taken up. Do not think pip-will change this; users have to change their habits acc. to pip.

Last edited by brobr; 11-20-2021 at 11:08 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'sudo pip install' is not recognized. 'pip install' is recognized. MrBright2019 Linux - Newbie 1 07-28-2020 10:09 PM
LXer: pip Uninstall | Uninstall a Package Installed with pip LXer Syndicated Linux News 0 03-01-2018 10:30 AM
Hello, Bon Jour, Pip Pip SocaSpice LinuxQuestions.org Member Intro 3 11-14-2010 08:22 AM
Adding cpython to nbpython! amaj1407 Programming 0 10-10-2008 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration