mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-22 05:59:58 +00:00
scripts: Remove dependency on the Python module distutils
The distutils package is deprecated and scheduled to be removed in Python 3.12. Use the sysconfig module instead. Signed-off-by: James Carter <jwcart2@gmail.com> Acked-by: Petr Lautrbach <plautrba@redhat.com>
This commit is contained in:
parent
c08cf24f39
commit
2b5d558575
@ -43,7 +43,7 @@ if [ -n "${SBINDIR:-}" ] ; then
|
||||
PATH="$DESTDIR$SBINDIR:$PATH"
|
||||
fi
|
||||
|
||||
NEW_PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(plat_specific=1, prefix='/usr'))"):$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
|
||||
NEW_PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('platlib', vars={'platbase': '/usr', 'base': '/usr'}))"):$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")"
|
||||
if [ -n "${PYTHONPATH:-}" ] ; then
|
||||
# Prefix the PYTHONPATH with the new directories
|
||||
export PYTHONPATH="$NEW_PYTHONPATH:$PYTHONPATH"
|
||||
|
@ -21,7 +21,7 @@ fi
|
||||
# Make sure to use the newly-installed libraries when running tests
|
||||
export LD_LIBRARY_PATH="$DESTDIR/usr/lib:$DESTDIR/lib"
|
||||
export PATH="$DESTDIR/usr/sbin:$DESTDIR/usr/bin:$DESTDIR/sbin:$DESTDIR/bin:$PATH"
|
||||
export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "from distutils.sysconfig import *;print(get_python_lib(prefix='/usr'))")"
|
||||
export PYTHONPATH="$DESTDIR$(${PYTHON:-python3} -c "import sysconfig; print(sysconfig.get_path('purelib', vars={'platbase': '/usr', 'base': '/usr'}))")"
|
||||
export RUBYLIB="$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorlibdir"]'):$DESTDIR/$(${RUBY:-ruby} -e 'puts RbConfig::CONFIG["vendorarchdir"]')"
|
||||
|
||||
if [ -f /etc/debian_version ] && [ -z "${IS_CIRCLE_CI:-}" ] ; then
|
||||
|
Loading…
Reference in New Issue
Block a user