Homebrew: formula fails to run with error ZIP does not support timestamps before 1980

2 weeks ago 25
ARTICLE AD BOX

I maintain a Homebrew formula on my own tap, and I'm having issues to update it. I'm not sure if this is Python- or Homebrew-related. Here is my formula:

class Kosmorro < Formula include Language::Python::Virtualenv desc "Ephemerides calculation program" homepage "https://kosmorro.space" url "https://files.pythonhosted.org/packages/8e/62/9c1f4377a50615be7046e3c6112ea7238bc5296d622946a3b360b6807765/kosmorro-1.0.1.tar.gz" sha256 "7eabe34410ace99d850786665276bf417ed33df998376adbc0af2d1c4431b873" revision 1 depends_on "[email protected]" depends_on "certifi" depends_on "numpy" depends_on "python-argcomplete" resource "babel" do url "https://files.pythonhosted.org/packages/7d/6b/d52e42361e1aa00709585ecc30b3f9684b3ab62530771402248b1b1d6240/babel-2.17.0.tar.gz" sha256 "0c54cffb19f690cdcc52a3b50bcbf71e07a808d1c80d549f2459b9d2cf0afb9d" end resource "jplephem" do url "https://files.pythonhosted.org/packages/3c/42/0545c37e070e5f940eb52987fb25a351ab3c9327b40bab6ad3dd6125b2e1/jplephem-2.23.tar.gz" sha256 "d3fb9477e4bf4c39d10497d4ff15e5271b7ac03fa101e1821aac527d646eccf9" end resource "kosmorrolib" do url "https://files.pythonhosted.org/packages/b0/04/699202c54fbcd60d8935a61faccb1ca4bcb2b5e53c13102ed476402e5f6f/kosmorrolib-1.0.13.tar.gz" sha256 "d327a3f20f485e46f520c2c55d573fcbe804bdb40131946f815feabc8a964d39" end resource "python-dateutil" do url "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz" sha256 "37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3" end resource "pytz" do url "https://files.pythonhosted.org/packages/f8/bf/abbd3cdfb8fbc7fb3d4d38d320f2441b1e7cbe29be4f23797b4a2b5d8aac/pytz-2025.2.tar.gz" sha256 "360b9e3dbb49a209c21ad61809c7fb453643e048b38924c765813546746e81c3" end resource "sgp4" do url "https://files.pythonhosted.org/packages/6e/d0/fc467010d17742321f73b16a71acac88439a88f2b166641942a6566c9b2a/sgp4-2.25.tar.gz" sha256 "e19edc6dcc25d69fb8fde0a267b8f0c44d7e915c7bcbeacf5d3a8b595baf0674" end resource "six" do url "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz" sha256 "ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81" end resource "skyfield" do url "https://files.pythonhosted.org/packages/2d/cb/0c9f9685f6ff3b9c268b1d995c584f0d09de160f46fbd6c1df0631565bfd/skyfield-1.53.tar.gz" sha256 "24099855f3ba3906663ac1c10e650041e747680b986e807400eddedc0be4a8b4" end resource "skyfield-data" do url "https://files.pythonhosted.org/packages/d3/6a/2f8d001dfcacb737cbdbc96db566eb9de9ebf0493bf9780785c42215c397/skyfield_data-7.0.0.tar.gz" sha256 "df3b4f0f5b5b57e5adf5a0a5d30d73ca23dd4066ee666da3222d7bd63d580bbd" end resource "tabulate" do url "https://files.pythonhosted.org/packages/ec/fe/802052aecb21e3797b8f7902564ab6ea0d60ff8ca23952079064155d1ae1/tabulate-0.9.0.tar.gz" sha256 "0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c" end resource "termcolor" do url "https://files.pythonhosted.org/packages/46/79/cf31d7a93a8fdc6aa0fbb665be84426a8c5a557d9240b6239e9e11e35fc5/termcolor-3.3.0.tar.gz" sha256 "348871ca648ec6a9a983a13ab626c0acce02f515b9e1983332b17af7979521c5" end def install virtualenv_install_with_resources end test do assert_includes shell_output("#{bin}/kosmorro --version"), "Kosmorro #{version}\n" end end

If I try to run brew install --verbose kosmorro, I get the following error:

==> python3.14 -m pip --python=/opt/homebrew/Cellar/kosmorro/1.0.1_1/libexec/bin/python install --verbose --no-deps --no-binary=:all: --ignore-installed --no-compile /private/tmp/kosmorro--termcolor-20260108-17232-gwhic8/termcolor-3.3.0 # [...] Successfully installed packaging-25.0 pathspec-1.0.2 pluggy-1.6.0 trove-classifiers-2025.12.1.14 Installing backend dependencies: finished with status 'done' Preparing metadata (pyproject.toml): started Running command Preparing metadata (pyproject.toml) Traceback (most recent call last): File "/opt/homebrew/Cellar/[email protected]/3.14.2/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() ~~~~^^ File "/opt/homebrew/Cellar/[email protected]/3.14.2/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/Cellar/[email protected]/3.14.2/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 178, in prepare_metadata_for_build_wheel whl_basename = backend.build_wheel(metadata_directory, config_settings) File "/private/tmp/pip-install-1nmvd257/hatchling_4c43f215e66d44f6a5b8b5d30915c8aa/src/hatchling/build.py", line 58, in build_wheel return os.path.basename(next(builder.build(directory=wheel_directory, versions=["standard"]))) ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/tmp/pip-install-1nmvd257/hatchling_4c43f215e66d44f6a5b8b5d30915c8aa/src/hatchling/builders/plugin/interface.py", line 157, in build artifact = version_api[version](directory, **build_data) File "/private/tmp/pip-install-1nmvd257/hatchling_4c43f215e66d44f6a5b8b5d30915c8aa/src/hatchling/builders/wheel.py", line 504, in build_standard record = archive.add_file(included_file) File "/private/tmp/pip-install-1nmvd257/hatchling_4c43f215e66d44f6a5b8b5d30915c8aa/src/hatchling/builders/wheel.py", line 99, in add_file zip_info = zipfile.ZipInfo(relative_path, cast(TIME_TUPLE, self.time_tuple)) File "/opt/homebrew/Cellar/[email protected]/3.14.2/Frameworks/Python.framework/Versions/3.14/lib/python3.14/zipfile/__init__.py", line 461, in __init__ raise ValueError('ZIP does not support timestamps before 1980') ValueError: ZIP does not support timestamps before 1980 error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> No available output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/homebrew/Cellar/kosmorro/1.0.1_1/libexec/bin/python /opt/homebrew/Cellar/[email protected]/3.14.2/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /private/tmp/tmp6ir61uid cwd: /private/tmp/pip-install-1nmvd257/hatchling_4c43f215e66d44f6a5b8b5d30915c8aa Preparing metadata (pyproject.toml): finished with status 'error' error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> hatchling note: This is an issue with the package mentioned above, not pip. hint: See above for details. error: subprocess-exited-with-error × installing build dependencies for hatch-vcs did not run successfully. │ exit code: 1 ╰─> No available output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/homebrew/Cellar/kosmorro/1.0.1_1/libexec/bin/python /opt/homebrew/Cellar/[email protected]/3.14.2/lib/python3.14/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-8ufbz3ty/overlay --no-warn-script-location --disable-pip-version-check --no-compile --target '' -v --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'hatchling>=1.1.0' cwd: [inherit] Installing build dependencies: finished with status 'error' ERROR: Failed to build 'hatch-vcs' when installing build dependencies for hatch-vcs error: subprocess-exited-with-error × installing build dependencies did not run successfully. │ exit code: 1 ╰─> No available output. note: This error originates from a subprocess, and is likely not a problem with pip. full command: /opt/homebrew/Cellar/kosmorro/1.0.1_1/libexec/bin/python /opt/homebrew/Cellar/[email protected]/3.14.2/lib/python3.14/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-0tyi9448/overlay --no-warn-script-location --disable-pip-version-check --no-compile --target '' -v --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- hatch-vcs 'hatchling>=1.27' cwd: [inherit] Installing build dependencies: finished with status 'error' ERROR: Failed to build 'file:///private/tmp/kosmorro--termcolor-20260108-17232-gwhic8/termcolor-3.3.0' when installing build dependencies

Before this update, the used termcolor dependency version was 2.5.0. Other changes include url and sha256 lines to follow the new version I want to package, and adding the pytz resource and the python-argcomplete dependency. Python version was already 3.14.

Everything built fine before these changes.

What's going?

Read Entire Article