mirror of https://github.com/python/cpython
Issue #19553: PEP 453 - "make install" and "make altinstall" now install or
upgrade pip by default, using the bundled pip provided by the new ensurepip module. A new configure option, --with-ensurepip[=upgrade|install|no], is available to override the default ensurepip "--upgrade" option. The option can also be set with "make [alt]install ENSUREPIP=[upgrade|install\no]".
This commit is contained in:
parent
b8f944f0b7
commit
322f5ba0d8
|
@ -5,6 +5,7 @@
|
||||||
VERSION=@VERSION@
|
VERSION=@VERSION@
|
||||||
ABIFLAGS=@ABIFLAGS@
|
ABIFLAGS=@ABIFLAGS@
|
||||||
LDVERSION=@LDVERSION@
|
LDVERSION=@LDVERSION@
|
||||||
|
ENSUREPIP=@ENSUREPIP@
|
||||||
builddir = ..
|
builddir = ..
|
||||||
srcdir=@srcdir@
|
srcdir=@srcdir@
|
||||||
prefix=@prefix@
|
prefix=@prefix@
|
||||||
|
@ -92,6 +93,16 @@ installunixtools:
|
||||||
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
|
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
|
||||||
done ;\
|
done ;\
|
||||||
fi
|
fi
|
||||||
|
-if test "x$(ENSUREPIP)" != "xno" ; then \
|
||||||
|
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
|
||||||
|
for fn in \
|
||||||
|
pip3 \
|
||||||
|
; \
|
||||||
|
do \
|
||||||
|
rm -f $${fn} ;\
|
||||||
|
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
|
||||||
|
done ;\
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Like installunixtools, but only install links to the versioned binaries.
|
# Like installunixtools, but only install links to the versioned binaries.
|
||||||
|
@ -133,6 +144,17 @@ altinstallunixtools:
|
||||||
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
|
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
|
||||||
done ;\
|
done ;\
|
||||||
fi
|
fi
|
||||||
|
-if test "x$(ENSUREPIP)" != "xno" ; then \
|
||||||
|
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
|
||||||
|
for fn in \
|
||||||
|
easy_install-$(VERSION) \
|
||||||
|
pip$(VERSION) \
|
||||||
|
; \
|
||||||
|
do \
|
||||||
|
rm -f $${fn} ;\
|
||||||
|
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
|
||||||
|
done ;\
|
||||||
|
fi
|
||||||
|
|
||||||
pythonw: $(srcdir)/Tools/pythonw.c Makefile
|
pythonw: $(srcdir)/Tools/pythonw.c Makefile
|
||||||
$(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ \
|
$(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ \
|
||||||
|
|
|
@ -160,6 +160,9 @@ OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
|
||||||
# Environment to run shared python without installed libraries
|
# Environment to run shared python without installed libraries
|
||||||
RUNSHARED= @RUNSHARED@
|
RUNSHARED= @RUNSHARED@
|
||||||
|
|
||||||
|
# ensurepip options
|
||||||
|
ENSUREPIP= @ENSUREPIP@
|
||||||
|
|
||||||
# Modes for directories, executables and data files created by the
|
# Modes for directories, executables and data files created by the
|
||||||
# install process. Default to user-only-writable for all file types.
|
# install process. Default to user-only-writable for all file types.
|
||||||
DIRMODE= 755
|
DIRMODE= 755
|
||||||
|
@ -961,10 +964,30 @@ quicktest: all platform
|
||||||
$(TESTRUNNER) $(QUICKTESTOPTS)
|
$(TESTRUNNER) $(QUICKTESTOPTS)
|
||||||
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
|
altinstall: commoninstall
|
||||||
sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@
|
if test "x$(ENSUREPIP)" != "xno" ; then \
|
||||||
|
case $(ENSUREPIP) in \
|
||||||
|
upgrade) ensurepip="--altinstall --upgrade" ;; \
|
||||||
|
install|*) ensurepip="--altinstall" ;; \
|
||||||
|
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
|
# Install shared libraries enabled by Setup
|
||||||
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
|
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
|
||||||
|
@ -1570,7 +1593,7 @@ Python/thread.o: @THREADHEADERS@
|
||||||
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
|
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
|
||||||
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
|
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
|
||||||
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
|
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
|
||||||
.PHONY: smelly funny patchcheck touch altmaninstall
|
.PHONY: smelly funny patchcheck touch altmaninstall commoninstall
|
||||||
.PHONY: gdbhooks
|
.PHONY: gdbhooks
|
||||||
|
|
||||||
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
||||||
|
|
|
@ -363,6 +363,12 @@ Build
|
||||||
installed for 64-bit/32-bit universal builds. The obsolete and
|
installed for 64-bit/32-bit universal builds. The obsolete and
|
||||||
undocumented pythonw* symlinks are no longer installed anywhere.
|
undocumented pythonw* symlinks are no longer installed anywhere.
|
||||||
|
|
||||||
|
- Issue #19553: PEP 453 - "make install" and "make altinstall" now install or
|
||||||
|
upgrade pip by default, using the bundled pip provided by the new ensurepip
|
||||||
|
module. A new configure option, --with-ensurepip[=upgrade|install|no], is
|
||||||
|
available to override the default ensurepip "--upgrade" option. The option
|
||||||
|
can also be set with "make [alt]install ENSUREPIP=[upgrade|install\no]".
|
||||||
|
|
||||||
Tools/Demos
|
Tools/Demos
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
|
|
|
@ -623,6 +623,7 @@ ac_includes_default="\
|
||||||
#endif"
|
#endif"
|
||||||
|
|
||||||
ac_subst_vars='LTLIBOBJS
|
ac_subst_vars='LTLIBOBJS
|
||||||
|
ENSUREPIP
|
||||||
SRCDIRS
|
SRCDIRS
|
||||||
THREADHEADERS
|
THREADHEADERS
|
||||||
LIBPL
|
LIBPL
|
||||||
|
@ -815,6 +816,7 @@ with_libm
|
||||||
with_libc
|
with_libc
|
||||||
enable_big_digits
|
enable_big_digits
|
||||||
with_computed_gotos
|
with_computed_gotos
|
||||||
|
with_ensurepip
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
|
@ -1498,6 +1500,8 @@ Optional Packages:
|
||||||
--with(out)-computed-gotos
|
--with(out)-computed-gotos
|
||||||
Use computed gotos in evaluation loop (enabled by
|
Use computed gotos in evaluation loop (enabled by
|
||||||
default on supported compilers)
|
default on supported compilers)
|
||||||
|
--with(out)-ensurepip=[=upgrade]
|
||||||
|
"install" or "upgrade" using bundled pip
|
||||||
|
|
||||||
Some influential environment variables:
|
Some influential environment variables:
|
||||||
MACHDEP name for machine-dependent library files
|
MACHDEP name for machine-dependent library files
|
||||||
|
@ -15344,6 +15348,31 @@ $as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ensurepip option
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
|
||||||
|
$as_echo_n "checking for ensurepip... " >&6; }
|
||||||
|
|
||||||
|
# Check whether --with-ensurepip was given.
|
||||||
|
if test "${with_ensurepip+set}" = set; then :
|
||||||
|
withval=$with_ensurepip;
|
||||||
|
else
|
||||||
|
with_ensurepip=upgrade
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $with_ensurepip in #(
|
||||||
|
yes|upgrade) :
|
||||||
|
ENSUREPIP=upgrade ;; #(
|
||||||
|
install) :
|
||||||
|
ENSUREPIP=install ;; #(
|
||||||
|
no) :
|
||||||
|
ENSUREPIP=no ;; #(
|
||||||
|
*) :
|
||||||
|
as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
|
||||||
|
esac
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
|
||||||
|
$as_echo "$ENSUREPIP" >&6; }
|
||||||
|
|
||||||
|
|
||||||
# generate output files
|
# generate output files
|
||||||
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
|
ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
|
||||||
|
|
||||||
|
|
15
configure.ac
15
configure.ac
|
@ -4767,6 +4767,21 @@ if test "$have_gcc_asm_for_x87" = yes; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ensurepip option
|
||||||
|
AC_MSG_CHECKING(for ensurepip)
|
||||||
|
AC_ARG_WITH(ensurepip,
|
||||||
|
[AS_HELP_STRING([--with(out)-ensurepip=@<:@=upgrade@:>@],
|
||||||
|
["install" or "upgrade" using bundled pip])],
|
||||||
|
[],
|
||||||
|
[with_ensurepip=upgrade])
|
||||||
|
AS_CASE($with_ensurepip,
|
||||||
|
[yes|upgrade],[ENSUREPIP=upgrade],
|
||||||
|
[install],[ENSUREPIP=install],
|
||||||
|
[no],[ENSUREPIP=no],
|
||||||
|
[AC_MSG_ERROR([--with-ensurepip=upgrade|install|no])])
|
||||||
|
AC_MSG_RESULT($ENSUREPIP)
|
||||||
|
AC_SUBST(ENSUREPIP)
|
||||||
|
|
||||||
# generate output files
|
# generate output files
|
||||||
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
|
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
|
||||||
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
|
AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
|
||||||
|
|
Loading…
Reference in New Issue