Is the are a single site-packages directory for multiple versions of python3 in rpm-based distros?
0
votes
0
answers
25
views
I am working on creating deb/rpm packages for a little project of mine .
I have already created the packages for a few rpm-based and deb-based distros. In deb distros one python file is being setup in
/usr/lib/python3/dist-packages/
. In rpm-based distros, I have to first detect the version of python being used when building and then I can set it up at the right directory. So, for rockylinux 9, I use /usr/lib64/python3.9/site-packages
, for fedora 42 I use /usr/lib64/python3.13/site-packages
. It works! However, I just realized that because on rpm distros the file is located in a python-version-dependent directory established when I am packaging it, if on the box it will run python is updated to a newer version from the one I used by default on that distro during packaging-time, it will break.
Is there a more python-minor-version independent directory that could be used in rpm-based distros? I don't want to add the file in multiple places just so that it is available in all the python versions that could be installed from distro packages.
Asked by eftshift0
(707 rep)
Jun 22, 2025, 10:14 PM