Skip to content

Commit 5a4e05a

Browse files
authored
Use non-editable installs for test generators (#4634)
Fixes up a regression introduced in: - #4627 This issue describes the problem and fix: - #4633 This will cause the venv to flip-flop between installing `eth2spec` in editable and non-editable modes if you switch between non-generator/generator targets. But that should be ok; `uv`'s good at that :)
1 parent 2a0ac6a commit 5a4e05a

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,11 @@ help-verbose:
189189
###############################################################################
190190

191191
VENV = .venv
192-
UV_RUN = uv run
192+
193+
# Use editable installs for all non-generation targets, but use non-editable
194+
# installs for generators. More details: ethereum/consensus-specs#4633.
195+
UV_RUN = uv run
196+
UV_RUN_NE = uv run --no-editable
193197

194198
# Sync dependencies using uv.
195199
_sync: MAYBE_VERBOSE := $(if $(filter true,$(verbose)),--verbose)
@@ -330,7 +334,7 @@ reftests: MAYBE_TESTS := $(if $(k),--cases $(subst ${COMMA}, ,$(k)))
330334
reftests: MAYBE_FORKS := $(if $(fork),--forks $(subst ${COMMA}, ,$(fork)))
331335
reftests: MAYBE_PRESETS := $(if $(preset),--presets $(subst ${COMMA}, ,$(preset)))
332336
reftests: _pyspec
333-
@$(UV_RUN) python -m tests.generators.main \
337+
@$(UV_RUN_NE) python -m tests.generators.main \
334338
--output $(TEST_VECTOR_DIR) \
335339
$(MAYBE_VERBOSE) \
336340
$(MAYBE_THREADS) \
@@ -346,7 +350,7 @@ comptests: MAYBE_FORKS := $(if $(fork),--forks $(subst ${COMMA}, ,$(fork)))
346350
comptests: MAYBE_PRESETS := $(if $(preset),--presets $(subst ${COMMA}, ,$(preset)))
347351
comptests: MAYBE_SEED := $(if $(seed),--fc-gen-seed $(seed))
348352
comptests: _pyspec
349-
@$(UV_RUN) python -m tests.generators.compliance_runners.fork_choice.test_gen \
353+
@$(UV_RUN_NE) python -m tests.generators.compliance_runners.fork_choice.test_gen \
350354
--output $(COMP_TEST_VECTOR_DIR) \
351355
--fc-gen-config $(FC_GEN_CONFIG) \
352356
$(MAYBE_THREADS) \

0 commit comments

Comments
 (0)