Author: mattip <matti.pi...@gmail.com> Branch: release-5.x Changeset: r82858:0bd65aa2c604 Date: 2016-02-08 21:53 +0200 http://bitbucket.org/pypy/pypy/changeset/0bd65aa2c604/
Log: create larger c files by indexing directories together (previously each file was seperate) diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py --- a/rpython/translator/c/genc.py +++ b/rpython/translator/c/genc.py @@ -547,6 +547,8 @@ relpypath = localpath.relto(pypkgpath.dirname) assert relpypath, ("%r should be relative to %r" % (localpath, pypkgpath.dirname)) + if len(relpypath.split(os.path.sep)) > 2: + return os.path.split(relpypath)[0] + '.c' return relpypath.replace('.py', '.c') return None if hasattr(node.obj, 'graph'): diff --git a/rpython/translator/c/test/test_standalone.py b/rpython/translator/c/test/test_standalone.py --- a/rpython/translator/c/test/test_standalone.py +++ b/rpython/translator/c/test/test_standalone.py @@ -123,9 +123,9 @@ # Verify that the generated C files have sane names: gen_c_files = [str(f) for f in cbuilder.extrafiles] - for expfile in ('rpython_rlib_rposix.c', - 'rpython_rtyper_lltypesystem_rstr.c', - 'rpython_translator_c_test_test_standalone.c'): + for expfile in ('rpython_rlib.c', + 'rpython_rtyper_lltypesystem.c', + 'rpython_translator_c_test.c'): assert cbuilder.targetdir.join(expfile) in gen_c_files def test_print(self): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit