Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.5
Changeset: r91013:2d2290c10270
Date: 2017-04-06 23:54 +0200
http://bitbucket.org/pypy/pypy/changeset/2d2290c10270/
Log: Don't hardcode 'python32.lib', use sys.version instead.
diff --git a/lib_pypy/_pypy_testcapi.py b/lib_pypy/_pypy_testcapi.py
--- a/lib_pypy/_pypy_testcapi.py
+++ b/lib_pypy/_pypy_testcapi.py
@@ -61,13 +61,12 @@
# set link options
output_filename = modulename + _get_c_extension_suffix()
if sys.platform == 'win32':
- # XXX pyconfig.h uses a pragma to link to the import library,
- # which is currently python3.lib
- library = os.path.join(thisdir, '..', 'libs', 'python32')
+ libname = 'python{0[0]}{0[1]}'.format(sys.version_info)
+ library = os.path.join(thisdir, '..', 'lib', libname)
if not os.path.exists(library + '.lib'):
# For a local translation or nightly build
- library = os.path.join(thisdir, '..', 'pypy', 'goal', 'python32')
- assert os.path.exists(library + '.lib'),'Could not find import library
"%s"' % library
+ library = os.path.join(thisdir, '..', 'pypy', 'goal', libname)
+ assert os.path.exists(library + '.lib'), 'Could not find import
library "%s"' % library
libraries = [library, 'oleaut32']
extra_ldargs = ['/MANIFEST', # needed for VC10
'/EXPORT:PyInit_' + modulename]
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit