diff options
author | Steven Koo <steven.koo@ni.com> | 2022-01-18 21:40:39 -0600 |
---|---|---|
committer | Aaron Rossetto <aaron.rossetto@ni.com> | 2022-01-20 08:31:50 -0600 |
commit | 396ed0c8afeb948afe7dfa4b413a865b15a8b18a (patch) | |
tree | 583ce9262fb82e6f4327d7a47760e7869d6273a7 /mpm/python | |
parent | 2c7ce2dbf72414b64f8a477be614e23bc12f086d (diff) | |
download | uhd-396ed0c8afeb948afe7dfa4b413a865b15a8b18a.tar.gz uhd-396ed0c8afeb948afe7dfa4b413a865b15a8b18a.tar.bz2 uhd-396ed0c8afeb948afe7dfa4b413a865b15a8b18a.zip |
fixup! cmake: Replace distutils.sysconfig with sysconfig
The original commit incorrectly fails the build
uhd in the meta-ettus context. This uses prefix
instead to get the base path.
Signed-off-by: Steven Koo <steven.koo@ni.com>
Diffstat (limited to 'mpm/python')
-rw-r--r-- | mpm/python/CMakeLists.txt | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mpm/python/CMakeLists.txt b/mpm/python/CMakeLists.txt index 260d3bab7..51aced18d 100644 --- a/mpm/python/CMakeLists.txt +++ b/mpm/python/CMakeLists.txt @@ -31,7 +31,7 @@ PYTHON_CHECK_MODULE( PYTHON_CHECK_MODULE_VERSION( "pyudev module" - "pyudev" + "pyudev" "pyudev.__version__" ${PYUDEV_MIN_VERSION} HAVE_PYTHON_MODULE_PYUDEV @@ -41,7 +41,7 @@ PYTHON_CHECK_MODULE_VERSION( # attribute, so merely check for its presence. PYTHON_CHECK_MODULE( "pyroute2 module" - "pyroute2" + "pyroute2" "True" HAVE_PYTHON_MODULE_PYROUTE2 ) @@ -101,10 +101,10 @@ add_custom_command(OUTPUT ${OUTPUT} add_custom_target(usrp_mpm ALL DEPENDS ${OUTPUT} pyusrp_periphs) execute_process(COMMAND ${PYTHON_EXECUTABLE} -c - "import sysconfig;\ + "import os,sysconfig;\ platlib = sysconfig.get_path(name='platlib');\ - base = sysconfig.get_config_var('base');\ - print(platlib.replace(base, '').lstrip('/\\\\'))" + prefix = sysconfig.get_config_var('prefix');\ + print(os.path.relpath(platlib, prefix));" OUTPUT_VARIABLE USRP_MPM_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE ) install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build/lib/usrp_mpm DESTINATION ${USRP_MPM_PYTHON_DIR}) |