Re: Timestamp of installed files

Paul Moore <[email protected]>
Newsgroups gmane.comp.python.distutils.devel
Message-ID <CACac1F_qrTKq1hSDDUVobT_SPP9x8rfCrKjr415h9MoQ5BUjoQ@mail.gmail.com>
On Sat, 4 Aug 2018 at 09:18, Chris Jerdonek <[email protected]> wrote:
>
> On Sat, Aug 4, 2018 at 1:08 AM, Paul Moore <[email protected]> wrote:
> > On Sat, 4 Aug 2018 at 08:35, Jeroen Demeyer <[email protected]> wrote:
> >
> >> So both are different issues, and I agree with both: during the source
> >> extraction and build process, you want to preserve timestamps as much as
> >> possible. But for the installation, you do NOT want to preserve timestamps.
> >
> > If this is about the distutils install command, it's worth noting that
> > pip is moving to a situation where we'll never use the
> > distutils/setuptools "install" command, bur rather we'll build wheels
> > and install from wheel. The new PEP 517 installation code will use
> > that route exclusively (there's not even a provision in PEP 517 for
> > direct installs from source). So the behaviour of the "setup.py
> > install" command won't affect pip installs at all in the longer term.
> > (How long, I don't know - it depends on how soon we feel we can switch
> > fully to PEP 517, and it's a bit premature to decide on that, as the
> > PEP 517 code isn't even released yet!)
>
> How is the new pip code path slated to behave with respect to Jeroen's
> question / preference? Is it already specified or does it fall out of
> the behavior of existing components, or is it still TBD?

For files extracted from wheels, this is the subject of
https://github.com/pypa/pip/issues/5648, as noted earlier in the
thread by Jeroen (and the commenters on that issue seem to favour
preserving timestamps - Jeroen seemed to say he agreed with this, but
I'm not sure I see how that matches his stated requirement for
installs to not preserve timestamps...). Whether timestamps are
preserved by the wheel building process depends on the build system -
so the question boils down to "does setup.py bdist_wheel preserve
timestamps?" in the case of the setuptools backend - which is really a
question for the wheel project. In the more general case, you'd have
to ask the same question of flit, and any other backends you cared
about.

So:

  * wheel -> installed: Currently under discussion, with (as far as I
can see) conflicting preferences. From the comments in issue 5648 it
seems like pip currently alters timestamps, but the commenters there
think it would be a "rather uncontroversial patch"
(https://github.com/pypa/pip/issues/5648#issuecomment-408439568) to
change that
  * source -> wheel: the backend's responsibility

Personally, I have no opinion on the matter.

Paul
--
Distutils-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/mm3/archives/list/[email protected]/message/KY66KDCRR72PRK6RFMAK5O6EGVPX4BK4/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.