diff options
author | Aleš Matěj <amatej@redhat.com> | 2021-04-20 11:33:09 +0200 |
---|---|---|
committer | Marek Blaha <mblaha@redhat.com> | 2021-04-21 15:42:54 +0200 |
commit | 69b2be23d46a9eb3a03ffff0a990a2ffbc3b63f9 (patch) | |
tree | 58dbe3fc00cce10751b23f7b13f3265786953576 | |
parent | ed0c0c8f1b5935971cafad3fdc91b16203a7a3f8 (diff) |
Remove distutils which are deprecated in python3.10
-rw-r--r-- | src/python/CMakeLists.txt | 2 | ||||
-rw-r--r-- | utils/setup_for_python_metadata.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index ecc262d..a31b14d 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -14,7 +14,7 @@ if (NOT SKBUILD) FIND_PACKAGE(PythonLibs 3 REQUIRED) endif (NOT SKBUILD) -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(True))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from sysconfig import get_path; stdout.write(get_path('platlib'))" OUTPUT_VARIABLE PYTHON_INSTALL_DIR) INCLUDE_DIRECTORIES (${PYTHON_INCLUDE_PATH}) MESSAGE(STATUS "Python install dir is ${PYTHON_INSTALL_DIR}") diff --git a/utils/setup_for_python_metadata.py b/utils/setup_for_python_metadata.py index c4bdce0..b1f3bd7 100644 --- a/utils/setup_for_python_metadata.py +++ b/utils/setup_for_python_metadata.py @@ -1,4 +1,4 @@ -from distutils.core import setup +from setuptools import setup import sys # This is a simple and fragile way of passing the current version |