Re: Timestamp of installed files
On 2018-08-04 10:34, Paul Moore wrote:
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...
The way how pip currently works (I assume that this stays the case) is that it uses a temporary build directory for everything, for example /tmp/pip-build-uvfWuR So concretely for a wheel install: (A) Extract the wheel in build directory (B) Generate .pyc files in build directory (C) Copy files from build directory to final installation directory in site-packages. The way I understand it, https://github.com/pypa/pip/issues/5648 is about (A) while my proposal is about (C). So I think that timestamps should be preserved in (A) but not for (C). Jeroen.
On Sat, 4 Aug 2018 at 10:05, Jeroen Demeyer
On 2018-08-04 10:34, Paul Moore wrote:
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...
The way how pip currently works (I assume that this stays the case) is that it uses a temporary build directory for everything, for example /tmp/pip-build-uvfWuR
So concretely for a wheel install:
(A) Extract the wheel in build directory
(B) Generate .pyc files in build directory
(C) Copy files from build directory to final installation directory in site-packages.
The way I understand it, https://github.com/pypa/pip/issues/5648 is about (A) while my proposal is about (C). So I think that timestamps should be preserved in (A) but not for (C).
Ah, OK. At the moment I believe we preserve in (C) - see https://github.com/pypa/pip/blob/master/src/pip/_internal/wheel.py#L304. The original code here just used shutil.move, but there were changes over time to restrict it to only copying certain metadata (specifically timestamps). But it's always preserved timestamps back to the original implementation in 2012. I still have no opinion on what's "right" here. Paul
participants (2)
-
Jeroen Demeyer
-
Paul Moore