diff options
author | Éric Araujo <merwok@netwok.org> | 2011-08-30 14:21:15 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-08-30 14:21:15 (GMT) |
commit | d15b768ddb68fe82470d26bb2cc36699f4bc0b75 (patch) | |
tree | 314bac1cdca839976e5de93505d7173add150826 /Lib/packaging/command/build_ext.py | |
parent | a514eb95f30306a11a14f8a3b9cbf229c6af6137 (diff) | |
parent | b9fe54cccc3798f089489ef1e7f9026a35d16d6b (diff) | |
download | cpython-d15b768ddb68fe82470d26bb2cc36699f4bc0b75.zip cpython-d15b768ddb68fe82470d26bb2cc36699f4bc0b75.tar.gz cpython-d15b768ddb68fe82470d26bb2cc36699f4bc0b75.tar.bz2 |
Branch merge
Diffstat (limited to 'Lib/packaging/command/build_ext.py')
-rw-r--r-- | Lib/packaging/command/build_ext.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Lib/packaging/command/build_ext.py b/Lib/packaging/command/build_ext.py index b0c3f16..c16b116 100644 --- a/Lib/packaging/command/build_ext.py +++ b/Lib/packaging/command/build_ext.py @@ -606,8 +606,7 @@ class build_ext(Command): template = "python%d%d" if self.debug: template = template + '_d' - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = template % sys.version_info[:2] # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] @@ -621,22 +620,19 @@ class build_ext(Command): # not at this time - AIM Apr01 #if self.debug: # template = template + '_d' - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = template % sys.version_info[:2] # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] elif sys.platform[:6] == "cygwin": template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = template % sys.version_info[:2] # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] elif sys.platform[:6] == "atheos": template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) + pythonlib = template % sys.version_info[:2] # Get SHLIBS from Makefile extra = [] for lib in sysconfig.get_config_var('SHLIBS').split(): @@ -654,9 +650,8 @@ class build_ext(Command): else: if sysconfig.get_config_var('Py_ENABLE_SHARED'): - pythonlib = 'python{}.{}{}'.format( - sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff, - sys.abiflags) + template = 'python%d%d' + sys.abiflags + pythonlib = template % sys.version_info[:2] return ext.libraries + [pythonlib] else: return ext.libraries |