LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-31-2024, 01:45 PM   #1
marrowsuck
Member
 
Registered: Sep 2006
Posts: 202

Rep: Reputation: 89
current: python-3.11 x86-64 site-packages under /usr/lib


Several x86_64 python libs are now under '/usr/lib/python3.11/site-packages' instead of '/usr/lib64/python3.11/site-packages/'

python3 -m sites now also lists '/usr/lib/python3.11/site-packages'.
 
Old 03-31-2024, 01:53 PM   #2
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 319

Rep: Reputation: 210Reputation: 210Reputation: 210
Quote:
Originally Posted by marrowsuck View Post
Several x86_64 python libs are now under '/usr/lib/python3.11/site-packages' instead of '/usr/lib64/python3.11/site-packages/'

python3 -m sites now also lists '/usr/lib/python3.11/site-packages'.
Just had this conversation in another thread, there's a note in the setuptools slackbuild about it.
https://www.linuxquestions.org/quest...ml#post6493214
 
Old 03-31-2024, 01:54 PM   #3
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,508

Rep: Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473
Quote:
Originally Posted by marrowsuck View Post
Several x86_64 python libs are now under '/usr/lib/python3.11/site-packages' instead of '/usr/lib64/python3.11/site-packages/'

python3 -m sites now also lists '/usr/lib/python3.11/site-packages'.
Here's a couple of commands that you should test:

Code:
find /usr/lib/python3.11 -type f | xargs file | grep x86-64
find /usr/lib64/python3.11 -type f | xargs file | grep x86-64
You'll notice that only under /usr/lib64 are there any Linux ELF x86-64 objects.

There do however, seem to be some x86-64 Windows turds under /usr/lib, and maybe something should be done about that.

It's still up in the air how multilib will react to this, but I suspect that python knows to look for binary objects in the platform library directory, and for any architecture independent files in the "purelib" (i.e. under /lib).

Another reference:

https://stackoverflow.com/questions/...latlib-purelib

As you can see, we were doing things differently from upstream (and pretty much everyone else) since the time of Slackware 13.0.
 
3 members found this post helpful.
Old 03-31-2024, 01:54 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-15.0
Posts: 2,687

Rep: Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375Reputation: 1375
Quote:
Originally Posted by marrowsuck View Post
Several x86_64 python libs are now under '/usr/lib/python3.11/site-packages' instead of '/usr/lib64/python3.11/site-packages/'

python3 -m sites now also lists '/usr/lib/python3.11/site-packages'.
From Pat's Python-setuptools SlackBuild

Code:
# After Python 3.9, we will not mess with the upstream module layout again.
if python3 --version | grep -q "Python 3.9." ; then
  # Recent Python versions support both a libdir (for pure Python modules) and a
  # platlib (for $ARCH specific modules). We've always patched Python to use
  # the platform directory (such as /usr/lib64/python3.9/site-packages on x86_64)
  # for all modules. Perhaps we will rethink this, but since an installed
  # setuptools now takes priority for reporting the libdir (and this no longer
  # matches the platlib on architectures such as x86_64), let's patch setuptools
  # to agree with Python:
  if [ "$LIBDIRSUFFIX" = "64" ]; then
    zcat $CWD/setuptools.x86_64.diff.gz | patch -p1 --verbose || exit 1
  fi
fi
Thanks to fourtysixandtwo for pointing this out to me
 
1 members found this post helpful.
Old 03-31-2024, 02:11 PM   #5
marrowsuck
Member
 
Registered: Sep 2006
Posts: 202

Original Poster
Rep: Reputation: 89
Alright! I'm reliefed. No more packaging today.
Thanks a lot for the clarification.
 
Old 03-31-2024, 02:12 PM   #6
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 319

Rep: Reputation: 210Reputation: 210Reputation: 210
Quote:
Originally Posted by volkerdi View Post
Here's a couple of commands that you should test:

Code:
find /usr/lib/python3.11 -type f | xargs file | grep x86-64
find /usr/lib64/python3.11 -type f | xargs file | grep x86-64
You'll notice that only under /usr/lib64 are there any Linux ELF x86-64 objects.

There do however, seem to be some x86-64 Windows turds under /usr/lib, and maybe something should be done about that.

It's still up in the air how multilib will react to this, but I suspect that python knows to look for binary objects in the platform library directory, and for any architecture independent files in the "purelib" (i.e. under /lib).

Another reference:

https://stackoverflow.com/questions/...latlib-purelib

As you can see, we were doing things differently from upstream (and pretty much everyone else) since the time of Slackware 13.0.
I can see that separation being useful. Any thought to setting noarch for the python packages that qualify?
 
Old 03-31-2024, 02:24 PM   #7
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,508

Rep: Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473Reputation: 8473
Quote:
Originally Posted by fourtysixandtwo View Post
I can see that separation being useful. Any thought to setting noarch for the python packages that qualify?
Since there's no guarantee that a package like that would remain noarch, probably it's safer to not do that.
 
1 members found this post helpful.
Old 04-02-2024, 08:39 AM   #8
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,975

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
Quote:
Originally Posted by volkerdi View Post
Here's a couple of commands that you should test:

Code:
find /usr/lib/python3.11 -type f | xargs file | grep x86-64
find /usr/lib64/python3.11 -type f | xargs file | grep x86-64
You'll notice that only under /usr/lib64 are there any Linux ELF x86-64 objects.
I checked with all of my third party packages. I've noticed that only the packages that do not have Linux ELF x86-64 objects are going in to /usr/lib. Packages with Linux ELF x86-64 objects are going to /usr/lib64.

I do have one exception. A third party program, flann. It places in python binding in /usr/lib.
Code:
find /usr/lib/python3.11 -type f | xargs file | grep x86-64
/usr/lib/python3.11/site-packages/pyflann/lib/libflann.so:                                                            ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, stripped
I'm absolutely okay with python doing what it doing.
 
  


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
Python extension module installed in /usr/local/lib[64]/python[2.7|3.x]/site-packages not found Nate_KS Slackware 1 07-11-2017 10:06 PM
OPENNMS INSTALLATION ERROR -install –disU –l /usr/lib/jni:/usr/lib ramecare Linux - Server 4 07-11-2011 12:06 PM
oops, I stripped /usr/lib and /usr/X11R6/lib ! H_TeXMeX_H Slackware 2 02-08-2007 09:27 PM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM
/usr/lib and /usr/local/lib doxxan Slackware 5 06-15-2004 12:58 AM

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

All times are GMT -5. The time now is 03:24 PM.

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