Author: Matti Picus <[email protected]>
Branch: win32-stdlib
Changeset: r54293:056d06128b67
Date: 2012-04-11 22:14 +0300
http://bitbucket.org/pypy/pypy/changeset/056d06128b67/
Log: help find import library, silence compiler warnings
diff --git a/lib_pypy/_ctypes_test.py b/lib_pypy/_ctypes_test.py
--- a/lib_pypy/_ctypes_test.py
+++ b/lib_pypy/_ctypes_test.py
@@ -21,7 +21,7 @@
# Compile .c file
include_dir = os.path.join(thisdir, '..', 'include')
if sys.platform == 'win32':
- ccflags = []
+ ccflags = ['-D_CRT_SECURE_NO_WARNINGS']
else:
ccflags = ['-fPIC']
res = compiler.compile([os.path.join(thisdir, '_ctypes_test.c')],
@@ -34,6 +34,13 @@
if sys.platform == 'win32':
# XXX libpypy-c.lib is currently not installed automatically
library = os.path.join(thisdir, '..', 'include', 'libpypy-c')
+ if not os.path.exists(library + '.lib'):
+ #For a nightly build
+ library = os.path.join(thisdir, '..', 'include', 'python27')
+ if not os.path.exists(library + '.lib'):
+ # For a local translation
+ library = os.path.join(thisdir, '..', 'pypy', 'translator',
+ 'goal', 'libpypy-c')
libraries = [library, 'oleaut32']
extra_ldargs = ['/MANIFEST'] # needed for VC10
else:
diff --git a/lib_pypy/_testcapi.py b/lib_pypy/_testcapi.py
--- a/lib_pypy/_testcapi.py
+++ b/lib_pypy/_testcapi.py
@@ -16,7 +16,7 @@
# Compile .c file
include_dir = os.path.join(thisdir, '..', 'include')
if sys.platform == 'win32':
- ccflags = []
+ ccflags = ['-D_CRT_SECURE_NO_WARNINGS']
else:
ccflags = ['-fPIC', '-Wimplicit-function-declaration']
res = compiler.compile([os.path.join(thisdir, '_testcapimodule.c')],
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit