[pypy-commit] pypy py3.5: The import library should be called python35.lib, and not hardcode python27...

amauryfa pypy.commits at gmail.com
Tue Apr 4 02:33:01 EDT 2017


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3.5
Changeset: r90944:4d18a461a973
Date: 2017-04-04 08:32 +0200
http://bitbucket.org/pypy/pypy/changeset/4d18a461a973/

Log:	The import library should be called python35.lib, and not hardcode
	python27...

diff --git a/lib_pypy/cffi/api.py b/lib_pypy/cffi/api.py
--- a/lib_pypy/cffi/api.py
+++ b/lib_pypy/cffi/api.py
@@ -563,7 +563,7 @@
             if sys.platform == "win32":
                 # we need 'libpypy-c.lib'.  Current distributions of
                 # pypy (>= 4.1) contain it as 'libs/python27.lib'.
-                pythonlib = "python27"
+                pythonlib = "python{0[0]}{0[1]}".format(sys.version_info)
                 if hasattr(sys, 'prefix'):
                     ensure('library_dirs', os.path.join(sys.prefix, 'libs'))
             else:
diff --git a/pypy/goal/targetpypystandalone.py b/pypy/goal/targetpypystandalone.py
--- a/pypy/goal/targetpypystandalone.py
+++ b/pypy/goal/targetpypystandalone.py
@@ -13,6 +13,7 @@
 from pypy import pypydir
 from rpython.rlib import rthread
 from pypy.module.thread import os_thread
+from pypy.module.sys.version import CPYTHON_VERSION
 
 thisdir = py.path.local(__file__).dirpath()
 
@@ -285,7 +286,8 @@
         if sys.platform == 'win32':
             libdir = thisdir.join('..', '..', 'libs')
             libdir.ensure(dir=1)
-            config.translation.libname = str(libdir.join('python27.lib'))
+            pythonlib = "python{0[0]}{0[1]}.lib".format(CPYTHON_VERSION)
+            config.translation.libname = str(libdir.join(pythonlib))
 
         if config.translation.thread:
             config.objspace.usemodules.thread = True


More information about the pypy-commit mailing list