diff options
author | Ned Deily <nad@acm.org> | 2014-11-20 10:11:03 (GMT) |
---|---|---|
committer | Ned Deily <nad@acm.org> | 2014-11-20 10:11:03 (GMT) |
commit | 3f1d0b31218f54c94d42659a30580cda3a4e68ea (patch) | |
tree | edb3aa425907d73a94d820667ec657fef6c8d1d9 /Makefile.pre.in | |
parent | a86c091a736020d823f1676acec7319bc5493f2c (diff) | |
download | cpython-3f1d0b31218f54c94d42659a30580cda3a4e68ea.zip cpython-3f1d0b31218f54c94d42659a30580cda3a4e68ea.tar.gz cpython-3f1d0b31218f54c94d42659a30580cda3a4e68ea.tar.bz2 |
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.in | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in index efa3b518..7f4ec2f 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 |