File: remove-distutils.patch

package info (click to toggle)
soapysdr 0.8.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: cpp: 5,378; ansic: 471; python: 311; sh: 21; makefile: 18
file content (24 lines) | stat: -rw-r--r-- 773 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: replace distutils.sysconfig.get_python_lib()
 with sysconfig.get_path()
Author: tony mancill <tmancill@debian.org>
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1065958

--- a/python/get_python_lib.py
+++ b/python/get_python_lib.py
@@ -1,13 +1,13 @@
 import os
 import sys
 import site
-from distutils.sysconfig import get_python_lib
+from sysconfig import get_path
 
 if __name__ == '__main__':
     prefix = sys.argv[1]
 
-    #ask distutils where to install the python module
-    install_dir = get_python_lib(plat_specific=True, prefix=prefix)
+    #ask sysconfig where to install the python module
+    install_dir = get_path('platlib', 'posix_user', {'userbase': prefix})
 
     #use sites when the prefix is already recognized
     try: