Skip to content
Prev Previous commit
Next Next commit
Integrate into build
  • Loading branch information
AA-Turner committed Sep 8, 2023
commit 0aaf135d1ea81adabe8fe48134aef450fe14eff2
17 changes: 14 additions & 3 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,13 @@ all: @DEF_MAKE_ALL_RULE@

.PHONY: build_all
build_all: check-clean-src $(BUILDPYTHON) platform sharedmods \
gdbhooks Programs/_testembed scripts checksharedmods rundsymutil
gdbhooks Programs/_testembed scripts checksharedmods rundsymutil \
ensurepip-wheels-stamp

.PHONY: build_wasm
build_wasm: check-clean-src $(BUILDPYTHON) platform sharedmods \
python-config checksharedmods
python-config checksharedmods \
ensurepip-wheels-stamp

# Check that the source is clean when building out of source.
.PHONY: check-clean-src
Expand Down Expand Up @@ -906,6 +908,15 @@ download-ensurepip-wheels: $(BUILDPYTHON) platform
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/Tools/build/bundle_ensurepip_wheels.py ; \
fi

ensurepip-wheels-stamp:
$(MAKE) download-ensurepip-wheels
touch $@

.PHONY: clean-ensurepip-wheels
clean-ensurepip-wheels:
rm -f $(srcdir)/Lib/ensurepip/_bundled/*.whl
rm -f ensurepip-wheels-stamp

##########################################################################
# Build static libmpdec.a
LIBMPDEC_CFLAGS=@LIBMPDEC_CFLAGS@ $(PY_STDMODULE_CFLAGS) $(CCSHARED)
Expand Down Expand Up @@ -2685,7 +2696,7 @@ profile-removal:
rm -f profile-bolt-stamp

.PHONY: clean
clean: clean-retain-profile clean-bolt
clean: clean-retain-profile clean-bolt clean-ensurepip-wheels
@if test @DEF_MAKE_ALL_RULE@ = profile-opt -o @DEF_MAKE_ALL_RULE@ = bolt-opt; then \
rm -f profile-gen-stamp profile-clean-stamp; \
$(MAKE) profile-removal; \
Expand Down
8 changes: 7 additions & 1 deletion PCbuild/regen.targets
Original file line number Diff line number Diff line change
Expand Up @@ -123,5 +123,11 @@ set PYTHONPATH=$(PySourcePath)Lib
<Message Text="Wrote $(OutDir)LICENSE.txt" Importance="high" />
</Target>

<Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense" />
<Target Name="_RegenEnsurepipWheels">
<Message Text="Bundle wheels for ensurepip" Importance="high" />
<Exec Command="$(PythonForBuild) Tools\build\bundle_ensurepip_wheels.py"
WorkingDirectory="$(PySourcePath)" />
</Target>

<Target Name="PostBuildRegen" DependsOnTargets="_RegenTestFrozenmain;_RegenLicense;_RegenEnsurepipWheels" />
</Project>