Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4841e2

Browse files
committed
fix some issues with install and altinstall #5818
1. fullinstall should install 'python' 2. remove link targets if already exist 3. make python3-config 4. install the man in altinstall 5. $(EXE) consistency Patch by Larry Hastings
1 parent 5859b86 commit f4841e2

1 file changed

Lines changed: 16 additions & 9 deletions

File tree

Makefile.pre.in

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -746,20 +746,20 @@ memtest: all platform
746746
-$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
747747
$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
748748

749-
# Install everything
750-
fullinstall: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
749+
# Install everything, and install Python 3 to "python"
750+
fullinstall: @FRAMEWORKINSTALLFIRST@ altinstall bininstall @FRAMEWORKINSTALLLAST@
751751

752-
# "make install" is an alias for "make altinstall" since we never want to
753-
# overwrite Python 2.x.
752+
# "make install" is an alias for "make altinstall" since we don't want to
753+
# overwrite Python 2.x by default.
754754
install: altinstall
755755
@echo "* Note: not installed as 'python'."
756756
@echo "* Use 'make fullinstall' to install as 'python'."
757757
@echo "* However, 'make fullinstall' is discouraged,"
758758
@echo "* as it will clobber your Python 2.x installation."
759759

760-
# Install almost everything without disturbing previous versions
760+
# Install almost everything without disturbing 2.x versions
761761
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
762-
sharedinstall oldsharedinstall @FRAMEWORKALTINSTALLLAST@
762+
sharedinstall oldsharedinstall maninstall @FRAMEWORKALTINSTALLLAST@
763763

764764
# Install shared libraries enabled by Setup
765765
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
@@ -785,10 +785,11 @@ $(DESTSHARED):
785785

786786
# Install the interpreter (by creating a hard link to python$(VERSION))
787787
bininstall: altbininstall
788-
-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \
789-
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
788+
-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON)$(EXE) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON)$(EXE); \
789+
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON)$(EXE); \
790790
else true; \
791791
fi
792+
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)$(EXE))
792793
-rm -f $(DESTDIR)$(BINDIR)/python-config
793794
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config)
794795

@@ -815,7 +816,13 @@ altbininstall: $(BUILDPYTHON)
815816
fi; \
816817
else true; \
817818
fi
818-
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3)
819+
-if test -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
820+
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON)3$(EXE); \
821+
else true; \
822+
fi
823+
(cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)3$(EXE))
824+
-rm -f $(DESTDIR)$(BINDIR)/python3-config
825+
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python3-config)
819826

820827
# Install the manual page
821828
maninstall:

0 commit comments

Comments
 (0)