eth-educators / ethstaker-deposit-cli

Secure key generation for deposits
https://eth-educators.github.io/ethstaker-deposit-cli/
Creative Commons Zero v1.0 Universal
3 stars 5 forks source link

Build changes #94

Closed yorickdowne closed 1 month ago

yorickdowne commented 1 month ago

Closes #91

Tested:

yorickdowne commented 1 month ago

I did not touch build_configs because I don't fully understand why we have individual spec files and requirements in there. We may not need this? On another project I am building with pyinstaller on all three OS with just the top-level requirements.txt.

remyroy commented 1 month ago

It seems like versions of the same packages in build_configs/common/requirements.txt and in the requirements file we have will have to match. I just tried building the project on this branch and it failed at this step:

Run python -m pip install --upgrade pip
  python -m pip install --upgrade pip
  pip install -r build_configs/linux/requirements.txt
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.1[2](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:2).5/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/[3](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:3).12.5/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.5/x6[4](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:4)
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.[5](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:5)/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.5/x[6](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:6)4
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.5/x64/lib
    PYTHONHASHSEED: 42
    SHORT_SHA: 1f55[7](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:7)b8

Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages (24.2)
Collecting cached-property==1.5.2 (from -r build_configs/linux/../common/../../requirements.txt (line 7))
  Downloading cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting click==7.1.2 (from -r build_configs/linux/../common/../../requirements.txt (line 10))
  Downloading click-7.1.2-py2.py3-none-any.whl ([8](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:8)2 kB)
Collecting cytoolz==0.12.3 (from -r build_configs/linux/../common/../../requirements.txt (line 13))
  Downloading cytoolz-0.12.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.8 MB/s eta 0:00:00
Collecting eth-hash==0.7.0 (from -r build_configs/linux/../common/../../requirements.txt (line 118))
  Downloading eth_hash-0.7.0-py3-none-any.whl (8.7 kB)
Collecting eth-typing==5.0.0 (from -r build_configs/linux/../common/../../requirements.txt (line 121))
  Downloading eth_typing-5.0.0-py3-none-any.whl (20 kB)
Collecting eth-utils==5.0.0 (from -r build_configs/linux/../common/../../requirements.txt (line 124))
  Downloading eth_utils-5.0.0-py3-none-any.whl (100 kB)
Collecting hexbytes==1.2.1 (from -r build_configs/linux/../common/../../requirements.txt (line 127))
  Downloading hexbytes-1.2.1-py3-none-any.whl (5.2 kB)
Collecting lru-dict==1.3.0 (from -r build_configs/linux/../common/../../requirements.txt (line 130))
  Downloading lru_dict-1.3.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (32 kB)
Collecting py-ecc==7.0.1 (from -r build_configs/linux/../common/../../requirements.txt (line 212))
  Downloading py_ecc-7.0.1-py3-none-any.whl (43 kB)
Collecting pycryptodome==3.20.0 (from -r build_configs/linux/../common/../../requirements.txt (line 215))
  Downloading pycryptodome-3.20.0-cp35-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 6[9](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:9)3.4 kB/s eta 0:00:00
Collecting pyrsistent==0.16.1 (from -r build_configs/linux/../common/../../requirements.txt (line 248))
  Downloading pyrsistent-0.16.1.tar.gz ([10](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:10)8 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting six==1.16.0 (from -r build_configs/linux/../common/../../requirements.txt (line 250))
  Downloading six-1.16.0-py2.py3-none-any.whl ([11](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:11) kB)
Collecting ssz==0.5.0 (from -r build_configs/linux/../common/../../requirements.txt (line 253))
  Downloading ssz-0.5.0-py3-none-any.whl (44 kB)
Collecting toolz==0.[12](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:12).1 (from -r build_configs/linux/../common/../../requirements.txt (line 256))
  Downloading toolz-0.12.1-py3-none-any.whl (56 kB)
Collecting typing-extensions==4.12.2 (from -r build_configs/linux/../common/../../requirements.txt (line 259))
  Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Collecting pyinstaller==6.9.0 (from -r build_configs/linux/../common/requirements.txt (line 5))
  Downloading pyinstaller-6.9.0-py3-none-manylinux20[14](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:14)_x86_64.whl (684 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 685.0/685.0 kB 361.4 kB/s eta 0:00:00
Collecting cffi==1.16.0 (from -r build_configs/linux/../common/requirements.txt (line 18))
  Downloading cffi-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux20[14](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:15)_x86_64.whl (477 kB)
Collecting pycparser==2.21 (from -r build_configs/linux/../common/requirements.txt (line 71))
  Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting altgraph==0.17.4 (from -r build_configs/linux/../common/requirements.txt (line 74))
  Downloading altgraph-0.17.4-py2.py3-none-any.whl (21 kB)
Collecting macholib==1.[16](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:17).3 (from -r build_configs/linux/../common/requirements.txt (line 77))
  Downloading macholib-1.16.3-py2.py3-none-any.whl (38 kB)
Collecting pyinstaller-hooks-contrib==2024.7 (from -r build_configs/linux/../common/requirements.txt (line 80))
  Downloading pyinstaller_hooks_contrib-2024.7-py2.py3-none-any.whl (341 kB)
Collecting importlib-metadata==7.0.1 (from -r build_configs/linux/../common/requirements.txt (line 83))
  Downloading importlib_metadata-7.0.1-py3-none-any.whl (23 kB)
Collecting zipp==3.[19](https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613#step:6:20).2 (from -r build_configs/linux/../common/requirements.txt (line 86))
  Downloading zipp-3.19.2-py3-none-any.whl (9.0 kB)
ERROR: Cannot install typing-extensions==4.12.2 and typing-extensions==4.9.0 because these package versions have conflicting dependencies.
The conflict is caused by:
    The user requested typing-extensions==4.12.2
    The user requested typing-extensions==4.9.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Error: Process completed with exit code 1.

From https://github.com/remyroy/ethstaker-deposit-cli/actions/runs/10563661034/job/29264356613 if you can see it.

EDIT: typing-extensions seems the only package in this situation. Updating it to 4.12.2 in the build_configs/common/requirements.txt file seems to fix everything on the build workflow.

yorickdowne commented 1 month ago

There's a larger discussion to be had about the build tools we use, and whether that should be broadly modernized. This PR is not that. It's meant to just bring a pyproject.toml so pip-compile works and we can easily update the requirements.xt - although that does mean we end up duplicating things in requirements_test.txt