Message311673
When a Python project is installed, distutils copies the files from the build to install directory using copy_file(). In this copy operation, timestamps are preserved. In other words, the timestamp of the installed file equals the timestamp of the source file.
By contrast, autotools does not preserve timestamps: the timestamp of the installed files equals the time of installation. This makes more sense because of dependency checking: if you reinstall a package, you typically want to rebuild everything depending on that package.
This issue is mostly relevant for installing .h files: most build systems (including distutils itself) provide a way to recompile C/C++ source files if they depend on a changed header file. But that only works if the timestamp of the header is updated when it is installed.
Note that ./command/build_py.py contains a comment
# XXX copy_file by default preserves atime and mtime. IMHO this is
# the right thing to do, but perhaps it should be an option -- in
# particular, a site administrator might want installed files to
# reflect the time of installation rather than the last
# modification time before the installed release.
but without justification. |
|
Date |
User |
Action |
Args |
2018-02-05 16:01:16 | jdemeyer | set | recipients:
+ jdemeyer, eric.araujo, erik.bray, dstufft |
2018-02-05 16:01:16 | jdemeyer | set | messageid: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> |
2018-02-05 16:01:16 | jdemeyer | link | issue32773 messages |
2018-02-05 16:01:16 | jdemeyer | create | |
|