File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ def finalize_options (self):
7070 if not self .target_version :
7171 self .target_version = ""
7272 if self .distribution .has_ext_modules ():
73- short_version = sys . version [: 3 ]
73+ short_version = get_python_version ()
7474 if self .target_version and self .target_version != short_version :
7575 raise DistutilsOptionError , \
7676 "target version can only be" + short_version
Original file line number Diff line number Diff line change 1212from types import *
1313from distutils .core import Command
1414from distutils .errors import *
15- from distutils .sysconfig import customize_compiler
15+ from distutils .sysconfig import customize_compiler , get_python_version
1616from distutils .dep_util import newer_group
1717from distutils .extension import Extension
1818from distutils import log
@@ -184,7 +184,7 @@ def finalize_options (self):
184184 if string .find (sys .executable , sys .exec_prefix ) != - 1 :
185185 # building third party extensions
186186 self .library_dirs .append (os .path .join (sys .prefix , "lib" ,
187- "python" + sys . version [: 3 ] ,
187+ "python" + get_python_version () ,
188188 "config" ))
189189 else :
190190 # building python standard extensions
You can’t perform that action at this time.
0 commit comments