Commit d0ed333e authored by Matti Picus's avatar Matti Picus
Browse files

create larger c files by indexing directories together (previously each file was seperate)

parent ab7250954435
......@@ -547,6 +547,8 @@ class SourceGenerator:
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'):
......
......@@ -123,9 +123,9 @@ class TestStandalone(StandaloneTests):
# 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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment