File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ PY_BIN := python3
4242VERSION := $(shell cd src;$(PY_BIN ) -c "from setup_common import * ; print(get_version() );")
4343PACKAGE := python-dmidecode
4444PY_VER := $(shell $(PY_BIN ) -c 'import sys; print("% d.% d"% sys.version_info[0:2]) ')
45+ PY_VER_DL := $(shell echo $(PY_VER ) | tr -d '.')
4546PY_MV := $(shell echo $(PY_VER ) | cut -b 1)
4647PY := python$(PY_VER )
47- SO_PATH := build/lib.linux-$(shell uname -m) -$( PY_VER )
48+ SO_PATH := build/lib.linux-$(shell uname -m) -cpython- $( PY_VER_DL )
4849ifeq ($(PY_MV ) ,2)
4950 SO := $(SO_PATH)/dmidecodemod.so
5051else
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- 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' )
33+ from sysconfig import get_config_var , get_path
3934
4035# libxml2 - C flags
4136def libxml2_include (incdir ):
@@ -55,7 +50,7 @@ def libxml2_include(incdir):
5550
5651# libxml2 - library flags
5752def libxml2_lib (libdir , libs ):
58- libdir .append (__python_lib )
53+ libdir .append (get_path ( 'platlib' ) )
5954 if os_path .exists ("/etc/debian_version" ): #. XXX: Debian Workaround...
6055 libdir .append ("/usr/lib/pymodules/python%d.%d" % sys .version_info [0 :2 ])
6156
You can’t perform that action at this time.
0 commit comments