Skip to content

Commit

Permalink
chore: remove reproducible wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
freedmand committed Feb 25, 2024
1 parent 72586f0 commit f28ee47
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions python/make_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,6 @@
version = f.read().strip()


class ReproducibleWheelFile(WheelFile):
# Copied from Zig make_wheels.py
def writestr(self, zinfo, *args, **kwargs):
if isinstance(zinfo, str):
# arcname provided
return self.writestr(ZipInfo(filename=zinfo, *args, **kwargs))

if not isinstance(zinfo, ZipInfo):
raise ValueError("ZipInfo required")
zinfo.date_time = time.gmtime(time.time())[0:6] # Current time
zinfo.create_system = 3
super().writestr(zinfo, *args, **kwargs)


def make_message(headers, payload=None):
# Copied from Zig make_wheels.py
msg = EmailMessage()
Expand All @@ -77,7 +63,7 @@ def make_message(headers, payload=None):

def write_wheel_file(filename, contents):
# Copied from Zig make_wheels.py
with ReproducibleWheelFile(filename, "w") as wheel:
with WheelFile(filename, "w") as wheel:
for member_info, member_source in contents.items():
if not isinstance(member_info, ZipInfo):
member_info = ZipInfo(member_info)
Expand Down

0 comments on commit f28ee47

Please sign in to comment.