mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-02-03 14:24:24 +00:00
Merge pull request #3927 from ethereum/fix-testgen-action
Fix test vector generators to work with Python 3.12
This commit is contained in:
commit
c8ba4d2ee7
4
.github/workflows/generate_vectors.yml
vendored
4
.github/workflows/generate_vectors.yml
vendored
@ -17,14 +17,14 @@ on:
|
||||
|
||||
jobs:
|
||||
generate-tests:
|
||||
runs-on: [self-hosted-ghr-custom, size-chungus-x64, profile-consensusSpecs]
|
||||
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'ethereum/consensus-specs'
|
||||
path: 'consensus-specs'
|
||||
ref: ${{ inputs.source_ref || 'dev' }}
|
||||
ref: ${{ inputs.ref || 'dev' }}
|
||||
- name: Checkout consensus-spec-tests repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
|
8
Makefile
8
Makefile
@ -96,6 +96,9 @@ dist_check:
|
||||
dist_upload:
|
||||
python3 -m twine upload dist/*
|
||||
|
||||
build_wheel: install_test pyspec
|
||||
. venv/bin/activate && \
|
||||
python3 -m build --no-isolation --outdir ./dist ./
|
||||
|
||||
# "make generate_tests" to run all generators
|
||||
generate_tests: $(GENERATOR_TARGETS)
|
||||
@ -195,7 +198,8 @@ define run_generator
|
||||
cd $(GENERATOR_DIR)/$(1); \
|
||||
if ! test -d venv; then python3 -m venv venv; fi; \
|
||||
. venv/bin/activate; \
|
||||
pip3 install -r requirements.txt; \
|
||||
pip3 install ../../../dist/eth2spec-*.whl; \
|
||||
pip3 install 'eth2spec[generator]'; \
|
||||
python3 main.py -o $(CURRENT_DIR)/$(TEST_VECTOR_DIR); \
|
||||
echo "generator $(1) finished"
|
||||
endef
|
||||
@ -217,7 +221,7 @@ gen_kzg_setups:
|
||||
|
||||
# For any generator, build it using the run_generator function.
|
||||
# (creation of output dir is a dependency)
|
||||
gen_%: $(TEST_VECTOR_DIR)
|
||||
gen_%: build_wheel $(TEST_VECTOR_DIR)
|
||||
$(call run_generator,$*)
|
||||
|
||||
detect_generator_incomplete: $(TEST_VECTOR_DIR)
|
||||
|
@ -1,4 +1,5 @@
|
||||
pip>=24.0.0
|
||||
wheel>=0.44.0
|
||||
setuptools>=72.0.0
|
||||
pylint>=3.2.0
|
||||
pylint>=3.2.0
|
||||
build>=1.2.2
|
20
setup.py
20
setup.py
@ -524,26 +524,30 @@ setup(
|
||||
long_description=readme,
|
||||
long_description_content_type="text/markdown",
|
||||
author="ethereum",
|
||||
url="https://github.com/ethereum/eth2.0-specs",
|
||||
url="https://github.com/ethereum/consensus-specs",
|
||||
include_package_data=False,
|
||||
package_data={'configs': ['*.yaml'],
|
||||
'presets': ['*.yaml'],
|
||||
'specs': ['**/*.md'],
|
||||
'eth2spec': ['VERSION.txt']},
|
||||
package_data={
|
||||
'configs': ['*.yaml'],
|
||||
'eth2spec': ['VERSION.txt'],
|
||||
'presets': ['**/*.yaml', '**/*.json'],
|
||||
'specs': ['**/*.md'],
|
||||
'sync': ['optimistic.md'],
|
||||
},
|
||||
package_dir={
|
||||
"eth2spec": "tests/core/pyspec/eth2spec",
|
||||
"configs": "configs",
|
||||
"eth2spec": "tests/core/pyspec/eth2spec",
|
||||
"presets": "presets",
|
||||
"specs": "specs",
|
||||
"sync": "sync",
|
||||
},
|
||||
packages=find_packages(where='tests/core/pyspec') + ['configs', 'specs'],
|
||||
packages=find_packages(where='tests/core/pyspec') + ['configs', 'presets', 'specs', 'presets', 'sync'],
|
||||
py_modules=["eth2spec"],
|
||||
cmdclass=commands,
|
||||
python_requires=">=3.9, <4",
|
||||
extras_require={
|
||||
"test": ["pytest>=4.4", "pytest-cov", "pytest-xdist"],
|
||||
"lint": ["flake8==5.0.4", "mypy==0.981", "pylint==2.15.3"],
|
||||
"generator": ["python-snappy==0.6.1", "filelock", "pathos==0.3.0"],
|
||||
"generator": ["setuptools>=72.0.0", "pytest>4.4", "python-snappy==0.7.3", "filelock", "pathos==0.3.0"],
|
||||
"docs": ["mkdocs==1.4.2", "mkdocs-material==9.1.5", "mdx-truly-sane-lists==1.3", "mkdocs-awesome-pages-plugin==2.8.0"]
|
||||
},
|
||||
install_requires=[
|
||||
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
@ -1,2 +0,0 @@
|
||||
pytest>=4.4
|
||||
../../../[generator]
|
Loading…
x
Reference in New Issue
Block a user