diff --git a/Makefile.pre.in b/Makefile.pre.in index c0992f0d47b2da..a7277eeb078b05 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -2991,12 +2991,14 @@ BUILD_SCRIPTS_DIR=build/scripts-$(VERSION) SCRIPT_IDLE=$(BUILD_SCRIPTS_DIR)/idle$(VERSION) SCRIPT_PYDOC=$(BUILD_SCRIPTS_DIR)/pydoc$(VERSION) -$(SCRIPT_IDLE): $(srcdir)/Tools/scripts/idle3 $(srcdir)/Misc/relocatable-script-header.in +$(SCRIPT_IDLE) $(SCRIPT_PYDOC): Makefile $(srcdir)/Misc/relocatable-script-header.in + +$(SCRIPT_IDLE): $(srcdir)/Tools/scripts/idle3 @$(MKDIR_P) $(BUILD_SCRIPTS_DIR) ($(BIN_SCRIPT_HEADER); sed 1d $(srcdir)/Tools/scripts/idle3) > $@ @chmod +x $@ -$(SCRIPT_PYDOC): $(srcdir)/Tools/scripts/pydoc3 $(srcdir)/Misc/relocatable-script-header.in +$(SCRIPT_PYDOC): $(srcdir)/Tools/scripts/pydoc3 @$(MKDIR_P) $(BUILD_SCRIPTS_DIR) ($(BIN_SCRIPT_HEADER); sed 1d $(srcdir)/Tools/scripts/pydoc3) > $@ @chmod +x $@ diff --git a/Misc/NEWS.d/next/Build/2026-12-02-15-20-35.gh-issue-119696.g8Q2Pb.rst b/Misc/NEWS.d/next/Build/2026-12-02-15-20-35.gh-issue-119696.g8Q2Pb.rst new file mode 100644 index 00000000000000..8d64ceaf6d92c5 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-12-02-15-20-35.gh-issue-119696.g8Q2Pb.rst @@ -0,0 +1,3 @@ +Regenerate the ``idle3`` and ``pydoc3`` launchers when reconfiguring +a build so their shebangs reflect the current installation prefix and +``--enable-relocatable`` setting.