On 24. 10. 22 15:14, Richard W.M. Jones wrote:
Original code:
$ python3 -c 'import distutils.sysconfig;
print(distutils.sysconfig.get_python_lib(1,0));'
/usr/lib64/python3.11/site-packages
Potential replacement:
$ python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"));'
/usr/local/lib64/python3.11/site-packages
That is a correct replacement. It will return the same value in rpmbuild
environment.
Maybe the original code was wrong, but I guess we don't want to
install site packages in /usr/local when running under RPM at least.
$ python3 -c 'import sysconfig; print(sysconfig.get_path("platlib"));'
/usr/local/lib64/python3.11/site-packages
$ RPM_BUILD_ROOT=/ python3 -c 'import sysconfig;
print(sysconfig.get_path("platlib"));'
/usr/lib64/python3.11/site-packages
--
Miro Hrončok
--
Phone: +420777974800
IRC: mhroncok
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue