summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-11-20 02:11:03 -0800
committerNed Deily <nad@acm.org>2014-11-20 02:11:03 -0800
commit3f1d0b31218f54c94d42659a30580cda3a4e68ea (patch)
treeedb3aa425907d73a94d820667ec657fef6c8d1d9 /Makefile.pre.in
parenta86c091a736020d823f1676acec7319bc5493f2c (diff)
downloadcpython-git-3f1d0b31218f54c94d42659a30580cda3a4e68ea.tar.gz
Issue 22878: PEP 477 - "make install" and "make altinstall" integration
The backport of ensurepip to 2.7.9 allows pip to optionally be installed or upgraded using the bundled pip provided by the new ensurepip module. The option can be specified persistently using the configure option: ./configure --with-ensurepip[=upgrade|install|no] It can also be overridden on either the "install" or "altinstall" targets: make [alt]install ENSUREPIP=[upgrade|install|no] For Python 2, the default option is "no" (do not install pip).
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in32
1 files changed, 27 insertions, 5 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index efa3b51830..7f4ec2f55e 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -144,6 +144,9 @@ OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
# Environment to run shared python without installed libraries
RUNSHARED= @RUNSHARED@
+# ensurepip options
+ENSUREPIP= @ENSUREPIP@
+
# Modes for directories, executables and data files created by the
# install process. Default to user-only-writable for all file types.
DIRMODE= 755
@@ -829,12 +832,31 @@ memtest: all platform
$(TESTPYTHON) $(TESTPROG) $(MEMTESTOPTS)
# Install everything
-install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
+install: @FRAMEWORKINSTALLFIRST@ commoninstall bininstall maninstall @FRAMEWORKINSTALLLAST@
+ if test "x$(ENSUREPIP)" != "xno" ; then \
+ case $(ENSUREPIP) in \
+ upgrade) ensurepip="--upgrade" ;; \
+ install|*) ensurepip="" ;; \
+ esac; \
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
+ $$ensurepip --root=$(DESTDIR)/ ; \
+ fi
# Install almost everything without disturbing previous versions
-altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall \
- libainstall altmaninstall \
- sharedinstall oldsharedinstall @FRAMEWORKALTINSTALLLAST@
+altinstall: commoninstall
+ if test "x$(ENSUREPIP)" != "xno" ; then \
+ case $(ENSUREPIP) in \
+ upgrade) ensurepip="--altinstall --upgrade --no-default-pip" ;; \
+ install|*) ensurepip="--altinstall --no-default-pip" ;; \
+ esac; \
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
+ $$ensurepip --root=$(DESTDIR)/ ; \
+ fi
+
+commoninstall: @FRAMEWORKALTINSTALLFIRST@ \
+ altbininstall libinstall inclinstall libainstall \
+ sharedinstall oldsharedinstall altmaninstall \
+ @FRAMEWORKALTINSTALLLAST@
# Install shared libraries enabled by Setup
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
@@ -1371,7 +1393,7 @@ Python/thread.o: @THREADHEADERS@
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
-.PHONY: smelly funny patchcheck touch altmaninstall
+.PHONY: smelly funny patchcheck touch altmaninstall commoninstall
.PHONY: gdbhooks
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY