Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new --no-use-system-time flag to use a deterministic timestamp in built PEX #722

Merged
merged 32 commits into from
May 8, 2019
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8b2fd37
Add deterministic_datetime() function
Eric-Arellano May 2, 2019
b440fbf
Proof of concept #1: monkey patch approach that works on 3.7
Eric-Arellano May 2, 2019
4b53a9e
Add new CLI flag --use-system-time
Eric-Arellano May 2, 2019
226c3bc
Approach #2: use writestr()
Eric-Arellano May 2, 2019
baa20c4
Add test for deterministic timestamp
Eric-Arellano May 3, 2019
a27122c
Unksip 6/7 of the acceptance tests!
Eric-Arellano May 3, 2019
e9a067a
Explain reproducibility
Eric-Arellano May 3, 2019
0295ddc
Setup integration tests to use --no-use-system-time
Eric-Arellano May 3, 2019
80adeff
Fix regression to normal case
Eric-Arellano May 3, 2019
5fe4a59
Set default to true to ensure we arent breaking anything
Eric-Arellano May 3, 2019
829d12d
Test deterministic timestamp against all CI
Eric-Arellano May 3, 2019
fdc1dc0
Skip acceptance tests still failing
Eric-Arellano May 3, 2019
80b5008
Fix typo in link
Eric-Arellano May 3, 2019
794084e
Fix bug with permissions not copying
Eric-Arellano May 3, 2019
952cf9e
Revert "Test deterministic timestamp against all CI"
Eric-Arellano May 3, 2019
a7b8558
Ensure env gets cleaned up, even if test fails
Eric-Arellano May 3, 2019
fda9a16
Merge branch 'master' of github.com:pantsbuild/pex into timestamps
Eric-Arellano May 5, 2019
f7364de
Convert deterministic_datetime from a function to a constant
Eric-Arellano May 5, 2019
0835f60
Revert making deterministic_datetime a constant
Eric-Arellano May 5, 2019
0c9bd41
No longer respect SOURCE_DATE_EPOCH
Eric-Arellano May 6, 2019
9774c2a
Improve comments
Eric-Arellano May 6, 2019
477e2eb
Change rationale for not respecting SOURCE_DATE_EPOCH
Eric-Arellano May 6, 2019
631b3ed
Drop overly verbose comment about SOURCE_DATE_EPOCH
Eric-Arellano May 7, 2019
69106c0
Create new zip_info_from_file() function as part of PermPreservingZip…
Eric-Arellano May 7, 2019
d82cd99
Always use zf.writestr()
Eric-Arellano May 7, 2019
b9d36e8
Remove bad extra whitespace
Eric-Arellano May 7, 2019
ebe15c2
Store DETERMINISTIC_DATETIME as a 6-tuple rather than datetime
Eric-Arellano May 7, 2019
099f146
Invert ternary expression
Eric-Arellano May 7, 2019
23c5a6f
Oops, typo in constant
Eric-Arellano May 7, 2019
8bb8ed4
Deduplicate slicing the time.struct_time
Eric-Arellano May 8, 2019
a528eb4
Don't lie about expected input
Eric-Arellano May 8, 2019
adf2726
Fix typo that was causing failures
Eric-Arellano May 8, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix bug with permissions not copying
Was accidently using the zip's overall filename to determine permissions, rather than the actual files themselves.
Eric-Arellano committed May 3, 2019
commit 794084ec9cf1ca1b077a560c5fcfd946d4e6a918
2 changes: 1 addition & 1 deletion pex/common.py
Original file line number Diff line number Diff line change
@@ -399,7 +399,7 @@ def zip(self, filename, mode='w', deterministic_timestamp=True):
else:
Eric-Arellano marked this conversation as resolved.
Show resolved Hide resolved
# This code mostly reimplements ZipInfo.from_file(), which is not available in Python
# 2.7. See https://github.com/python/cpython/blob/master/Lib/zipfile.py#L495.
st = os.stat(filename)
st = os.stat(full_path)
isdir = stat.S_ISDIR(st.st_mode)
# Determine arcname, i.e. the archive name.
arcname = f