From 07308c33743fa64e8256f9667d5eca948e3ec57a Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Fri, 7 Jul 2023 01:24:02 +0800 Subject: [PATCH 1/2] Upgrade wheel pip setuptools with `make install_test` --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6c852a1e94..43dd9aeaa0 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,7 @@ pyspec: # installs the packages to run pyspec tests install_test: - python3 -m venv venv; . venv/bin/activate; python3 -m pip install -e .[lint]; python3 -m pip install -e .[test] + python3 -m venv venv; . venv/bin/activate; python3 -m pip install --upgrade wheel pip setuptools; python3 -m pip install -e .[lint]; python3 -m pip install -e .[test] # Testing against `minimal` or `mainnet` config by default test: pyspec From 06dc897f630255098ca4ce0fd0e70863afb4401d Mon Sep 17 00:00:00 2001 From: Hsiao-Wei Wang Date: Sun, 9 Jul 2023 15:13:48 +0800 Subject: [PATCH 2/2] Set minimum requirements --- .circleci/config.yml | 8 ++++---- Makefile | 10 ++++++++-- requirements_preinstallation.txt | 3 +++ 3 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 requirements_preinstallation.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 157c56ca5f..b7426c63e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,26 +36,26 @@ commands: steps: - restore_cached_venv: venv_name: v24-pyspec - reqs_checksum: cache-{{ checksum "setup.py" }} + reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }} save_pyspec_cached_venv: description: Save a venv into a cache with pyspec keys" steps: - save_cached_venv: venv_name: v24-pyspec - reqs_checksum: cache-{{ checksum "setup.py" }} + reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }} venv_path: ./venv restore_deposit_contract_tester_cached_venv: description: "Restore the venv from cache for the deposit contract tester" steps: - restore_cached_venv: venv_name: v23-deposit-contract-tester - reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }} + reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }} save_deposit_contract_tester_cached_venv: description: "Save the venv to cache for later use of the deposit contract tester" steps: - save_cached_venv: venv_name: v23-deposit-contract-tester - reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }} + reqs_checksum: cache-{{ checksum "setup.py" }}-{{ checksum "requirements_preinstallation.txt" }}-{{ checksum "solidity_deposit_contract/web3_tester/requirements.txt" }} venv_path: ./solidity_deposit_contract/web3_tester/venv jobs: checkout_specs: diff --git a/Makefile b/Makefile index 43dd9aeaa0..16d189c05a 100644 --- a/Makefile +++ b/Makefile @@ -104,9 +104,15 @@ generate_tests: $(GENERATOR_TARGETS) pyspec: python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev +# check the setup tool requirements +preinstallation: + python3 -m venv venv; . venv/bin/activate; \ + python3 -m pip install -r requirements_preinstallation.txt + # installs the packages to run pyspec tests -install_test: - python3 -m venv venv; . venv/bin/activate; python3 -m pip install --upgrade wheel pip setuptools; python3 -m pip install -e .[lint]; python3 -m pip install -e .[test] +install_test: preinstallation + python3 -m venv venv; . venv/bin/activate; \ + python3 -m pip install -e .[lint]; python3 -m pip install -e .[test] # Testing against `minimal` or `mainnet` config by default test: pyspec diff --git a/requirements_preinstallation.txt b/requirements_preinstallation.txt new file mode 100644 index 0000000000..69d9a66607 --- /dev/null +++ b/requirements_preinstallation.txt @@ -0,0 +1,3 @@ +pip>=23.1.2 +wheel>=0.40.0 +setuptools>=68.0.0