Skip to content

Commit f760421

Browse files
authored
Merge pull request #450 from citrus-it/pydates
Fix .py timestamp derivation from git history
2 parents 5b0d787 + 645ee2f commit f760421

File tree

2 files changed

+5
-98
lines changed

2 files changed

+5
-98
lines changed

src/pydates

Lines changed: 0 additions & 93 deletions
This file was deleted.

src/setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,12 +1159,11 @@ def __init__(self, dist):
11591159
# consistent across builds, causing their corresponding .pyc
11601160
# files to be unchanged unless the .py file content changed.
11611161

1162-
self.timestamps = {}
1162+
print("Gathering file timestamps from git history")
11631163

1164-
pydates = "pydates"
1164+
self.timestamps = {}
11651165

1166-
if os.path.isdir(os.path.join(pwd, "../.git")):
1167-
pydates = "pydates.git"
1166+
pydates = "pydates.git"
11681167

11691168
p = subprocess.Popen(
11701169
os.path.join(pwd, pydates),
@@ -1257,7 +1256,8 @@ def copy_file(self, infile, outfile, preserve_mode=1, preserve_times=1,
12571256
src_mtime = self.timestamps[b"."]
12581257
else:
12591258
src_mtime = self.timestamps.get(
1260-
os.path.join("src", infile), self.timestamps[b"."])
1259+
os.path.join("src", infile).encode('utf-8'),
1260+
self.timestamps[b"."])
12611261

12621262
# Force a copy of the file if the source timestamp is different
12631263
# from that of the destination, not just if it's newer. This

0 commit comments

Comments
 (0)