Skip to content

Commit c1b8aed

Browse files
authored
[3.6] bpo-30638: Add clinic to make regen-all (pythonGH-5671)
Also, use PYTHON_FOR_REGEN for clinic and blake2s_impl.c rather than PYTHON_FOR_BUILD, and update .travis.yml to make use of the change. (cherry picked from commit d6ff8a7)
1 parent dda9386 commit c1b8aed

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,15 @@ before_script:
8787
fi
8888
# Build in debug mode
8989
./configure --with-pydebug PYTHON_FOR_REGEN=python3
90-
make -j4
91-
make -j4 regen-all clinic
90+
make -j4 regen-all
9291
changes=`git status --porcelain`
9392
if ! test -z "$changes"
9493
then
9594
echo "Generated files not up to date"
9695
echo "$changes"
9796
exit 1
9897
fi
98+
make -j4
9999
make pythoninfo
100100
101101
script:

Makefile.pre.in

+7-7
Original file line numberDiff line numberDiff line change
@@ -538,10 +538,9 @@ coverage-report: regen-grammar regen-importlib
538538
$(MAKE) coverage-lcov
539539

540540
# Run "Argument Clinic" over all source files
541-
# (depends on python having already been built)
542541
.PHONY=clinic
543-
clinic: check-clean-src $(BUILDPYTHON) $(srcdir)/Modules/_blake2/blake2s_impl.c
544-
$(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py --make
542+
clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c
543+
$(PYTHON_FOR_REGEN) ./Tools/clinic/clinic.py --make
545544

546545
# Build the interpreter
547546
$(BUILDPYTHON): Programs/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY)
@@ -571,9 +570,9 @@ Modules/_math.o: Modules/_math.c Modules/_math.h
571570
$(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
572571

573572
# blake2s is auto-generated from blake2b
574-
$(srcdir)/Modules/_blake2/blake2s_impl.c: $(BUILDPYTHON) $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py
575-
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Modules/_blake2/blake2b2s.py
576-
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/clinic/clinic.py -f $@
573+
$(srcdir)/Modules/_blake2/blake2s_impl.c: $(srcdir)/Modules/_blake2/blake2b_impl.c $(srcdir)/Modules/_blake2/blake2b2s.py
574+
$(PYTHON_FOR_REGEN) $(srcdir)/Modules/_blake2/blake2b2s.py
575+
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/clinic/clinic.py -f $@
577576

578577
# Build the shared modules
579578
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
@@ -720,7 +719,8 @@ regen-importlib: Programs/_freeze_importlib
720719
############################################################################
721720
# Regenerate all generated files
722721

723-
regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar regen-ast regen-importlib
722+
regen-all: regen-opcode regen-opcode-targets regen-typeslots regen-grammar \
723+
regen-ast regen-importlib clinic
724724

725725
############################################################################
726726
# Special rules for object files

0 commit comments

Comments
 (0)