[pypy-commit] pypy release-2.2.x: fix for issue 1635, building extension module with MSVC

mattip noreply at buildbot.pypy.org
Sun Nov 24 11:49:45 CET 2013


Author: Matti Picus <matti.picus at gmail.com>
Branch: release-2.2.x
Changeset: r68305:dd150c0b090f
Date: 2013-11-24 10:25 +0200
http://bitbucket.org/pypy/pypy/changeset/dd150c0b090f/

Log:	fix for issue 1635, building extension module with MSVC
	(transplanted from ea530af6eb9c23550c80cb6ed17ae9de58f9cc57)

diff --git a/pypy/module/cpyext/include/pyconfig.h b/pypy/module/cpyext/include/pyconfig.h
--- a/pypy/module/cpyext/include/pyconfig.h
+++ b/pypy/module/cpyext/include/pyconfig.h
@@ -25,6 +25,20 @@
 #define Py_UNICODE_SIZE 2
 #endif
 
+#if defined(_MSC_VER)
+   /* So MSVC users need not specify the .lib file in
+    * their Makefile (other compilers are generally
+    * taken care of by distutils.) */
+#    ifdef _DEBUG
+#        error("debug first with cpython")    
+#        pragma comment(lib,"python27.lib")
+#    else
+#        pragma comment(lib,"python27.lib")
+#    endif /* _DEBUG */
+#endif /* _MSC_VER */
+
+
+
 #ifdef __cplusplus
 }
 #endif


More information about the pypy-commit mailing list