[pypy-svn] r46611 - pypy/dist/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Sat Sep 15 10:49:51 CEST 2007


Author: arigo
Date: Sat Sep 15 10:49:45 2007
New Revision: 46611

Modified:
   pypy/dist/pypy/translator/c/genc.py
Log:
Fix the generated setup.py.


Modified: pypy/dist/pypy/translator/c/genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/genc.py	(original)
+++ pypy/dist/pypy/translator/c/genc.py	Sat Sep 15 10:49:45 2007
@@ -144,7 +144,8 @@
             cfile, extra, extraincludes = gen_source(db, modulename, targetdir,
                                                 defines = defines,
                                                 exports = self.exports,
-                                                symboltable = self.symboltable)
+                                                symboltable = self.symboltable,
+                                                libraries = self.libraries)
         else:
             if self.config.translation.instrument:
                 defines['INSTRUMENT'] = 1
@@ -704,7 +705,7 @@
 
 
 def gen_source(database, modulename, targetdir, defines={}, exports={},
-               symboltable=None):
+               symboltable=None, libraries=[]):
     assert not database.standalone
     if isinstance(targetdir, str):
         targetdir = py.path.local(targetdir)
@@ -881,7 +882,8 @@
       ext_modules = [Extension(name = "%(modulename)s",
                             sources = ["%(modulename)s.c"],
                  extra_compile_args = extra_compile_args,
-                       include_dirs = [PYPY_INCLUDE_DIR])])
+                       include_dirs = [PYPY_INCLUDE_DIR],
+                          libraries = %(libraries)r)])
 '''
 
 MAKEFILE = '''



More information about the Pypy-commit mailing list