Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9a38dcf

Browse files
committed
[Bug #599248] ext module generation problem
If you have source files srcdir1/foo.c and srcdir2/foo.c, the temporary .o for both files is written to build/temp.<platform>/foo.o. This patch sets strip_dir to false for both calls to object_filename, so now the object files are written to temp.<platform>/srcdir1/foo.o and .../srcdir2/foo.o. 2.2 bugfix candidate
1 parent b2db587 commit 9a38dcf

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/distutils/ccompiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def _setup_compile(self, outdir, macros, incdirs, sources, depends,
366366
extra = []
367367

368368
# Get the list of expected output (object) files
369-
objects = self.object_filenames(sources, 1, outdir)
369+
objects = self.object_filenames(sources, 0, outdir)
370370
assert len(objects) == len(sources)
371371

372372
# XXX should redo this code to eliminate skip_source entirely.
@@ -472,7 +472,7 @@ def _prep_compile(self, sources, output_dir, depends=None):
472472
which source files can be skipped.
473473
"""
474474
# Get the list of expected output (object) files
475-
objects = self.object_filenames(sources, strip_dir=1,
475+
objects = self.object_filenames(sources, strip_dir=0,
476476
output_dir=output_dir)
477477
assert len(objects) == len(sources)
478478

0 commit comments

Comments
 (0)