File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 3030if sys .version_info [0 ] < 3 :
3131 import commands as subprocess
3232from os import path as os_path
33- from distutils .sysconfig import get_python_lib
33+ try :
34+ from distutils .sysconfig import get_python_lib , get_config_var
35+ __python_lib = get_python_lib (1 )
36+ except ImportError :
37+ from sysconfig import get_config_var , get_path
38+ __python_lib = get_path ('platlib' )
3439
3540# libxml2 - C flags
3641def libxml2_include (incdir ):
@@ -50,7 +55,7 @@ def libxml2_include(incdir):
5055
5156# libxml2 - library flags
5257def libxml2_lib (libdir , libs ):
53- libdir .append (get_python_lib ( 1 ) )
58+ libdir .append (__python_lib )
5459 if os_path .exists ("/etc/debian_version" ): #. XXX: Debian Workaround...
5560 libdir .append ("/usr/lib/pymodules/python%d.%d" % sys .version_info [0 :2 ])
5661
@@ -69,7 +74,10 @@ def libxml2_lib(libdir, libs):
6974 libs .append (l .replace ("-l" , "" , 1 ))
7075
7176 # this library is not reported and we need it anyway
72- libs .append ('xml2mod' )
77+ if get_config_var ("SOABI" ):
78+ libs .append ('xml2mod.%s' % get_config_var ("SOABI" ))
79+ else :
80+ libs .append ('xml2mod' )
7381
7482
7583
You can’t perform that action at this time.
0 commit comments