@@ -34,7 +34,7 @@ MARKDOWN_FILES = $(wildcard $(SPEC_DIR)/*/*.md) \
3434 $(wildcard $(SPEC_DIR ) /_features/* /* /* .md) \
3535 $(wildcard $(SSZ_DIR ) /* .md)
3636
37- ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb electra whisk eip6800 eip7732
37+ ALL_EXECUTABLE_SPEC_NAMES = phase0 altair bellatrix capella deneb electra whisk eip6800 eip7594 eip7732
3838# The parameters for commands. Use `foreach` to avoid listing specs again.
3939COVERAGE_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES ) , --cov=eth2spec.$S.$(TEST_PRESET_TYPE ) )
4040PYLINT_SCOPE := $(foreach S,$(ALL_EXECUTABLE_SPEC_NAMES ) , ./eth2spec/$S)
@@ -96,13 +96,16 @@ dist_check:
9696dist_upload :
9797 python3 -m twine upload dist/*
9898
99+ build_wheel : install_test pyspec
100+ . venv/bin/activate && \
101+ python3 -m build --no-isolation --outdir ./dist ./
99102
100103# "make generate_tests" to run all generators
101104generate_tests : $(GENERATOR_TARGETS )
102105
103106# "make pyspec" to create the pyspec for all phases.
104107pyspec :
105- python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev
108+ @ python3 -m venv venv; . venv/bin/activate; python3 setup.py pyspecdev
106109
107110# check the setup tool requirements
108111preinstallation :
@@ -138,13 +141,21 @@ endif
138141open_cov :
139142 (( open "$(COV_INDEX_FILE)" || xdg- open "$(COV_INDEX_FILE)") &> / dev/ null) &
140143
144+ # Check all files and error if any ToC were modified.
141145check_toc : $(MARKDOWN_FILES:=.toc )
146+ @[ " $$ (find . -name '*.md.tmp' -print -quit)" ] && exit 1 || exit 0
142147
148+ # Generate ToC sections & save copy of original if modified.
143149% .toc :
144- cp $* $* .tmp && \
145- doctoc $* && \
146- diff -q $* $* .tmp && \
147- rm $* .tmp
150+ @cp $* $* .tmp; \
151+ doctoc $* > /dev/null; \
152+ if diff -q $* $* .tmp > /dev/null; then \
153+ echo " Good $* " ; \
154+ rm $* .tmp; \
155+ else \
156+ echo " \033[1;33m Bad $* \033[0m" ; \
157+ echo " \033[1;34m See $* .tmp\033[0m" ; \
158+ fi
148159
149160codespell :
150161 codespell . --skip " ./.git,./venv,$( PY_SPEC_DIR) /.mypy_cache" -I .codespell-whitelist
@@ -195,7 +206,8 @@ define run_generator
195206 cd $(GENERATOR_DIR ) /$(1 ) ; \
196207 if ! test -d venv; then python3 -m venv venv; fi; \
197208 . venv/bin/activate; \
198- pip3 install -r requirements.txt; \
209+ pip3 install ../../../dist/eth2spec-*.whl; \
210+ pip3 install 'eth2spec[generator]'; \
199211 python3 main.py -o $(CURRENT_DIR ) /$(TEST_VECTOR_DIR ) ; \
200212 echo "generator $(1 ) finished"
201213endef
@@ -217,7 +229,7 @@ gen_kzg_setups:
217229
218230# For any generator, build it using the run_generator function.
219231# (creation of output dir is a dependency)
220- gen_% : $(TEST_VECTOR_DIR )
232+ gen_% : build_wheel $(TEST_VECTOR_DIR )
221233 $(call run_generator,$* )
222234
223235detect_generator_incomplete : $(TEST_VECTOR_DIR )
0 commit comments