[pypy-commit] pypy cpyext-injection: tweaks for downstream packages

mattip pypy.commits at gmail.com
Tue Nov 15 12:32:53 EST 2016


Author: Matti Picus <matti.picus at gmail.com>
Branch: cpyext-injection
Changeset: r88390:7da08ee4b6be
Date: 2016-11-15 19:31 +0200
http://bitbucket.org/pypy/pypy/changeset/7da08ee4b6be/

Log:	tweaks for downstream packages

diff --git a/lib-python/2.7/distutils/sysconfig_pypy.py b/lib-python/2.7/distutils/sysconfig_pypy.py
--- a/lib-python/2.7/distutils/sysconfig_pypy.py
+++ b/lib-python/2.7/distutils/sysconfig_pypy.py
@@ -66,6 +66,7 @@
     g['SO'] = [s[0] for s in imp.get_suffixes() if s[2] == imp.C_EXTENSION][0]
     g['LIBDIR'] = os.path.join(sys.prefix, 'lib')
     g['CC'] = "gcc -pthread" # -pthread might not be valid on OS/X, check
+    g['OPT'] = "" 
 
     global _config_vars
     _config_vars = g
diff --git a/pypy/module/cpyext/include/pyport.h b/pypy/module/cpyext/include/pyport.h
--- a/pypy/module/cpyext/include/pyport.h
+++ b/pypy/module/cpyext/include/pyport.h
@@ -39,6 +39,10 @@
 #define PY_SIZE_MAX ((size_t)-1)
 #endif
 
+/* CPython needs this for the c-extension datetime, which is pure python on PyPy 
+   downstream packages assume it is here (Pandas for instance) */
+#include <time.h> 
+
 /* uintptr_t is the C9X name for an unsigned integral type such that a
  * legitimate void* can be cast to uintptr_t and then back to void* again
  * without loss of information.  Similarly for intptr_t, wrt a signed


More information about the pypy-commit mailing list