Author: Armin Rigo <[email protected]>
Branch: embedding-pypy-win32
Changeset: r2623:4383aaecf96d
Date: 2016-02-11 14:57 +0100
http://bitbucket.org/cffi/cffi/changeset/4383aaecf96d/
Log: I finally managed to run the tests on Windows, but only without
changes in that file and by copying the file "libpypy-c.lib" from
translation to a subdirectory "bin" of "sys.prefix"
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -549,25 +549,24 @@
if value not in lst:
lst.append(value)
#
- if sys.platform == "win32":
- # XXX pypy should not reuse the same import library name
- template = "python%d%d"
- if hasattr(sys, 'gettotalrefcount'):
- template += '_d'
+ if '__pypy__' in sys.builtin_module_names:
+ if hasattr(sys, 'prefix'):
+ import os
+ ensure('library_dirs', os.path.join(sys.prefix, 'bin'))
+ pythonlib = "pypy-c"
else:
- if '__pypy__' in sys.builtin_module_names:
- if hasattr(sys, 'prefix'):
- import os
- ensure('library_dirs', os.path.join(sys.prefix, 'bin'))
- pythonlib = "pypy-c"
+ if sys.platform == "win32":
+ template = "python%d%d"
+ if hasattr(sys, 'gettotalrefcount'):
+ template += '_d'
else:
template = "python%d.%d"
if sysconfig.get_config_var('DEBUG_EXT'):
template += sysconfig.get_config_var('DEBUG_EXT')
- pythonlib = (template %
- (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
- if hasattr(sys, 'abiflags'):
- pythonlib += sys.abiflags
+ pythonlib = (template %
+ (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
+ if hasattr(sys, 'abiflags'):
+ pythonlib += sys.abiflags
ensure('libraries', pythonlib)
if sys.platform == "win32":
ensure('extra_link_args', '/MANIFEST')
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit