debian-koji/devtools/get_site_packages.py
Tomas Kopecek 6e1ae7231e replace deprecated distutils
distutils will get removed in python 3.12. It is usage is now replaced
by sysconfig. For py2 version code stays in specfile.

https://docs.python.org/3/whatsnew/3.10.html#distutils-deprecated

Related: https://pagure.io/koji/issue/3514
2023-01-16 12:36:04 +01:00

8 lines
230 B
Python

# prints site-packages path for use in Makefiles
try:
from distutils.sysconfig import get_python_lib
print(get_python_lib())
except ImportError:
import sysconfig
print(sysconfig.get_path('purelib', 'rpm_prefix'))