This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author collinwinter
Recipients collinwinter, jyasskin, tarek
Date 2009-02-26.00:05:23
SpamBayes Score 7.2085245e-06
Marked as misclassified No
Message-id <1235606727.67.0.443849487538.issue5372@psf.upfronthosting.co.za>
In-reply-to
Content
(Tarek, I've been told you're the new distutils maintainer. Feel free to
unassign this if that isn't the case.)

The test distutils uses to decide whether it needs to recompile an
existing .o file when building extension modules is too simplistic,
merely comparing the modification time of the .o and .c files. If you
have two extension modules like so

Extension('foo', ['foo.c', 'bar.c'],
          define_macros=[('NO_STATIC_MEMOTABLE', 1)])

Extension('bar', ['bar.c'])

even if defining NO_STATIC_MEMOTABLE=1 radically changes the code of
bar.c, distutils will use the same bar.o for both the foo and bar
extension modules. This was a real problem for me at work today.

The attached patch removes the modtime comparison entirely, preferring
to rebuild all .o files a given extension module needs. Note that while
_prep_compiler() isn't used anywhere in the stdlib, Google Code Search
turns up uses.
History
Date User Action Args
2009-02-26 00:05:27collinwintersetrecipients: + collinwinter, jyasskin, tarek
2009-02-26 00:05:27collinwintersetmessageid: <1235606727.67.0.443849487538.issue5372@psf.upfronthosting.co.za>
2009-02-26 00:05:25collinwinterlinkissue5372 messages
2009-02-26 00:05:25collinwintercreate