yegle / fava-docker

A Dockerfile for beancount-fava
MIT License
91 stars 45 forks source link

Image build is failing due to recursive `require-hashes` #39

Closed lutzky closed 3 months ago

lutzky commented 3 months ago

The latest build fails: https://github.com/yegle/fava-docker/actions/runs/8402693021/job/23012360617

> [linux/amd64 build_env 13/17] RUN pip3 install --require-hashes -U -r requirements.txt:
1.215 Collecting beancount-reds-plugins==0.3.0
1.465   Downloading beancount_reds_plugins-0.3.0-py3-none-any.whl (54 kB)
1.522 Collecting beancount-periodic==0.1.2
1.546   Downloading beancount-periodic-0.1.2.tar.gz (11 kB)
1.773 Requirement already satisfied: beancount>=2.3.4 in /app/lib/python3.9/site-packages (from beancount-periodic==0.1.2->-r requirements.txt (line 2)) (2.3.6)
1.802 Collecting python-dateutil~=2.8.2
1.802 ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
1.802     python-dateutil~=2.8.2 from https://files.pythonhosted.org/packages/36/7a/87837f39d0296e723bb9b62bbb257d0355c7f6128853c78955f57342a56d/python_dateutil-2.8.2-py2.py3-none-any.whl#sha256=961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 (from beancount-periodic==0.1.2->-r requirements.txt (line 2))

Indeed beancount-periodic doesn't pin hashes in its own requirements.txt... and never did. I'm not sure how this worked before.

lutzky commented 3 months ago

...worse yet, removing beancount-periodic from the requirements works fine, i.e. it doesn't have a problem with beancount_reds_plugins, which also doesn't specify hashes in its requirements.txt.

yegle commented 3 months ago

I think it simply means beancount-perodic needs to specify python-dateutil==2.82. It doesn't require them to have hashes.

yegle commented 3 months ago

And one way to workaround it is to install python-dateutil==2.8.2 prior to installing beancount-periodic.

Feel free to send a PR for this change :-)

lutzky commented 3 months ago

Heh, that's a much more straightforward reading of the error message, and, of course, works :grin: