hatch icon indicating copy to clipboard operation
hatch copied to clipboard

Support a SOURCE_DATE_EPOCH prior to 1980

Open branchv opened this issue 8 months ago • 1 comments

Fixes #1605

A common value for SOURCE_DATE_EPOCH is 0, which unfortunately breaks hatchling:

$ uv init --build-backend=hatch
$ SOURCE_DATE_EPOCH=0 uv build
# ...
  File "/opt/homebrew/Cellar/[email protected]/3.13.4/Frameworks/Python.framework/Versions/3.13/lib/python3.13/zipfile/__init__.py", line 412, in __init__
    raise ValueError('ZIP does not support timestamps before 1980')
ValueError: ZIP does not support timestamps before 1980

This clamps to 1980 instead (same as setuptools and flit-core. poetry also support this but defaults to 2016)

branchv avatar Jun 11 '25 03:06 branchv

@ofek @cjames23 sorry for the ping, but Homebrew has been working around this bug for a while so I'd love to see this merged

branchv avatar Dec 10 '25 15:12 branchv