[pypy-svn] r75547 - pypy/trunk/pypy/module/cpyext
fijal at codespeak.net
fijal at codespeak.net
Thu Jun 24 02:16:25 CEST 2010
Author: fijal
Date: Thu Jun 24 02:16:23 2010
New Revision: 75547
Modified:
pypy/trunk/pypy/module/cpyext/api.py
Log:
Don't use absoulte path, instead use separate_module_source. Reason: hardcoded
paths in makefiles are bad
Modified: pypy/trunk/pypy/module/cpyext/api.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/api.py (original)
+++ pypy/trunk/pypy/module/cpyext/api.py Thu Jun 24 02:16:23 2010
@@ -809,7 +809,6 @@
kwds["includes"] = ['Python.h'] # this is our Python.h
# Generate definitions for global structures
- struct_file = udir.join('pypy_structs.c')
structs = ["#include <Python.h>"]
for name, (typ, expr) in GLOBALS.iteritems():
if name.endswith('#'):
@@ -819,7 +818,7 @@
structs.append('PyObject* %s = (PyObject*)&_%s;' % (name, name))
elif typ == 'PyDateTime_CAPI*':
structs.append('%s %s = NULL;' % (typ, name))
- struct_file.write('\n'.join(structs))
+ struct_source = '\n'.join(structs)
eci = ExternalCompilationInfo(
include_dirs=include_dirs,
@@ -833,9 +832,8 @@
source_dir / "bufferobject.c",
source_dir / "object.c",
source_dir / "cobject.c",
- struct_file,
],
- separate_module_sources = [code],
+ separate_module_sources = [code, struct_source],
export_symbols=export_symbols_eci,
compile_extra=compile_extra,
**kwds
More information about the Pypy-commit
mailing list