Skip to content

Commit

Permalink
Remove distutils which are deprecated in python3.10 (RhBug:1950229)
Browse files Browse the repository at this point in the history
  • Loading branch information
kontura authored and m-blaha committed Apr 21, 2021
1 parent 7d0284f commit 18995d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ELSE ()
MESSAGE (FATAL_ERROR "Invalid PYTHON_DESIRED value: " ${PYTHON_DESIRED})
ENDIF()

EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('purelib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR)
MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}")

ADD_SUBDIRECTORY (dnf)
Expand Down
4 changes: 2 additions & 2 deletions dnf/const.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#

from __future__ import unicode_literals
import distutils.sysconfig
import sysconfig

CONF_FILENAME='/etc/dnf/dnf.conf' # :api
CONF_AUTOMATIC_FILENAME='/etc/dnf/automatic.conf'
Expand Down Expand Up @@ -50,7 +50,7 @@ VERBOSE_LEVEL=6
PREFIX=NAME.lower()
PROGRAM_NAME=NAME.lower() # Deprecated - no longer used, Argparser prints program name based on sys.argv
PLUGINCONFPATH = '/etc/dnf/plugins' # :api
PLUGINPATH = '%s/dnf-plugins' % distutils.sysconfig.get_python_lib()
PLUGINPATH = '%s/dnf-plugins' % sysconfig.get_path('purelib')
VERSION='@DNF_VERSION@'
USER_AGENT = "dnf/%s" % VERSION

Expand Down
1 change: 0 additions & 1 deletion dnf/persistor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
from __future__ import absolute_import
from __future__ import unicode_literals
from dnf.i18n import _
import distutils.version
import dnf.util
import errno
import fnmatch
Expand Down

0 comments on commit 18995d6

Please sign in to comment.