Author: Armin Rigo <[email protected]>
Branch: embedding-pypy-win32
Changeset: r2624:cd622fb7a0d3
Date: 2016-02-11 15:15 +0100
http://bitbucket.org/cffi/cffi/changeset/cd622fb7a0d3/
Log: Windows need the file 'libpypy-c.lib', which (unless people
disagree) I will add to pypy distributions next
diff --git a/cffi/api.py b/cffi/api.py
--- a/cffi/api.py
+++ b/cffi/api.py
@@ -550,10 +550,19 @@
lst.append(value)
#
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":
+ # we need 'libpypy-c.lib' (included with recent pypy distrib)
+ # in addition to the runtime 'libpypy-c.dll'
+ pythonlib = "libpypy-c"
+ if hasattr(sys, 'prefix'):
+ ensure('library_dirs', sys.prefix)
+ else:
+ # we need 'libpypy-c.{so,dylib}', which should be by
+ # default located in 'sys.prefix/bin'
+ pythonlib = "pypy-c"
+ if hasattr(sys, 'prefix'):
+ import os
+ ensure('library_dirs', os.path.join(sys.prefix, 'bin'))
else:
if sys.platform == "win32":
template = "python%d%d"
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit