File: set_python3_sysconfig_scheme

package info (click to toggle)
uhd 4.3.0.0%2Bds1-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 175,384 kB
  • sloc: cpp: 271,145; ansic: 103,960; python: 95,906; vhdl: 55,838; tcl: 14,117; xml: 8,535; makefile: 2,706; sh: 2,432; pascal: 230; javascript: 120; csh: 94; asm: 20; perl: 11
file content (28 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From: "A. Maitland Bottoms" <bottoms@debian.org>
Subject: set python3 sysconfig scheme

 Newer Python3 versions changed the defaults UHD depended upon.
 Being explicit in calling sysconfig.get_path fixes this.

--- a/host/python/CMakeLists.txt
+++ b/host/python/CMakeLists.txt
@@ -167,7 +167,7 @@
     if(NOT DEFINED UHD_PYTHON_DIR)
         execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
             "import os,sysconfig;\
-            platlib = sysconfig.get_path(name='platlib');\
+            platlib = sysconfig.get_path(name='platlib',scheme='posix_prefix');\
             prefix = sysconfig.get_config_var('prefix');\
             print(os.path.relpath(platlib, prefix));"
             OUTPUT_VARIABLE UHD_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE
--- a/mpm/python/CMakeLists.txt
+++ b/mpm/python/CMakeLists.txt
@@ -103,7 +103,7 @@
 if(NOT DEFINED USRP_MPM_PYTHON_DIR)
     execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
         "import os,sysconfig;\
-        platlib = sysconfig.get_path(name='platlib');\
+        platlib = sysconfig.get_path(name='platlib',scheme='posix_prefix');\
         prefix = sysconfig.get_config_var('prefix');\
         print(os.path.relpath(platlib, prefix));"
         OUTPUT_VARIABLE USRP_MPM_PYTHON_DIR OUTPUT_STRIP_TRAILING_WHITESPACE