hardcode modified time inside zip
This commit is contained in:
parent
1da2230527
commit
df7f64f059
2 changed files with 4 additions and 0 deletions
4
build.py
4
build.py
|
|
@ -1,3 +1,4 @@
|
||||||
|
from datetime import datetime
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import zipfile
|
import zipfile
|
||||||
|
|
@ -118,6 +119,9 @@ def create_font_specific_zip(font_path: Path, src_dir: Path, learn_projects_dir:
|
||||||
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zf:
|
with zipfile.ZipFile(output_zip, 'w', zipfile.ZIP_DEFLATED) as zf:
|
||||||
for file_path in temp_dir.rglob("*"):
|
for file_path in temp_dir.rglob("*"):
|
||||||
if file_path.is_file():
|
if file_path.is_file():
|
||||||
|
modification_time = datetime(2000, 1, 1, 0, 0, 0)
|
||||||
|
modification_timestamp = modification_time.timestamp()
|
||||||
|
os.utime(file_path, (modification_timestamp, modification_timestamp))
|
||||||
arcname = file_path.relative_to(temp_dir)
|
arcname = file_path.relative_to(temp_dir)
|
||||||
zf.write(file_path, arcname)
|
zf.write(file_path, arcname)
|
||||||
|
|
||||||
|
|
|
||||||
0
src/__init__.py
Normal file
0
src/__init__.py
Normal file
Loading…
Reference in a new issue