Issue #19649: On OS X, the same set of file names are now installed

in bin directories for all configurations: non-framework vs framework,
and single arch vs universal builds.  pythonx.y-32 is now always
installed for 64-bit/32-bit universal builds.  The obsolete and
undocumented pythonw* symlinks are no longer installed anywhere.
This commit is contained in:
Ned Deily 2013-11-21 22:42:25 -08:00
parent c06d6fdc37
commit b8f944f0b7
5 changed files with 116 additions and 41 deletions

View File

@ -3,9 +3,12 @@
# commandline in that case.
VERSION=@VERSION@
ABIFLAGS=@ABIFLAGS@
LDVERSION=@LDVERSION@
builddir = ..
srcdir=@srcdir@
prefix=@prefix@
exec_prefix=@exec_prefix@
LIBDEST=$(prefix)/lib/python$(VERSION)
RUNSHARED=@RUNSHARED@
BUILDEXE=@BUILDEXEEXT@
@ -23,7 +26,7 @@ export MACOSX_DEPLOYMENT_TARGET
# These are normally glimpsed from the previous set
bindir=$(prefix)/bin
BINDIR= @bindir@
PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION)
APPINSTALLDIR=$(prefix)/Resources/Python.app
@ -46,19 +49,7 @@ APPTEMPLATE=$(srcdir)/Resources/app
APPSUBDIRS=MacOS Resources
compileall=$(srcdir)/../Lib/compileall.py
installapps: install_Python install_pythonw install_PythonLauncher install_IDLE
install_pythonw: pythonw
$(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/pythonw$(VERSION)"
$(INSTALL_PROGRAM) $(STRIPFLAG) pythonw "$(DESTDIR)$(prefix)/bin/python$(VERSION)"
ln -sf python$(VERSION) "$(DESTDIR)$(prefix)/bin/python3"
ln -sf pythonw$(VERSION) "$(DESTDIR)$(prefix)/bin/pythonw3"
ifneq ($(LIPO_32BIT_FLAGS),)
lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/python$(VERSION)-32 pythonw
lipo $(LIPO_32BIT_FLAGS) -output $(DESTDIR)$(prefix)/bin/pythonw$(VERSION)-32 pythonw
ln -sf pythonw$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/pythonw3-32"
ln -sf python$(VERSION)-32 "$(DESTDIR)$(prefix)/bin/python3-32"
endif
installapps: install_Python install_PythonLauncher install_IDLE
#
# Install unix tools in /usr/local/bin. These are just aliases for the
@ -68,21 +59,39 @@ installunixtools:
if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
fi
for fn in python3 pythonw3 idle3 pydoc3 python3-config \
python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
pydoc$(VERSION) python$(VERSION)-config 2to3 \
2to3-$(VERSION) pyvenv pyvenv-$(VERSION) ;\
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
for fn in \
2to3 \
idle3 \
pydoc3 \
python3 \
python3-config \
pyvenv \
; \
do \
ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
rm -f $${fn} ; \
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done
ifneq ($(LIPO_32BIT_FLAGS),)
for fn in python3-32 pythonw3-32 \
python$(VERSION)-32 pythonw$(VERSION)-32 ;\
-if test "x$(VERSION)" != "x$(LDVERSION)"; then \
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
for fn in \
python$(VERSION)-config \
; \
do \
ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
done
endif
rm -f $${fn} ;\
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done ;\
fi
-if test "x$(LIPO_32BIT_FLAGS)" != "x"; then \
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
for fn in \
python3-32 \
; \
do \
rm -f $${fn} ;\
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done ;\
fi
#
# Like installunixtools, but only install links to the versioned binaries.
@ -91,20 +100,44 @@ altinstallunixtools:
if [ ! -d "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ]; then \
$(INSTALL) -d -m $(DIRMODE) "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" ;\
fi
for fn in python$(VERSION) pythonw$(VERSION) idle$(VERSION) \
pydoc$(VERSION) python$(VERSION)-config 2to3-$(VERSION) pyvenv-$(VERSION) ;\
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
for fn in \
2to3-$(VERSION) \
idle$(VERSION) \
pydoc$(VERSION) \
python$(VERSION) \
python$(LDVERSION)-config \
pyvenv-$(VERSION) \
; \
do \
ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
rm -f $${fn} ;\
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done
ifneq ($(LIPO_32BIT_FLAGS),)
for fn in python$(VERSION)-32 pythonw$(VERSION)-32 ;\
-if test "x$(VERSION)" != "x$(LDVERSION)"; then \
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
for fn in \
python$(LDVERSION) \
; \
do \
ln -fs "$(prefix)/bin/$${fn}" "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin/$${fn}" ;\
done
endif
rm -f $${fn} ;\
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done ;\
fi
-if test "x$(LIPO_32BIT_FLAGS)" != "x"; then \
cd "$(DESTDIR)$(FRAMEWORKUNIXTOOLSPREFIX)/bin" && \
for fn in \
python$(VERSION)-32 \
; \
do \
rm -f $${fn} ;\
$(LN) -s $(BINDIR)/$${fn} $${fn} ;\
done ;\
fi
pythonw: $(srcdir)/Tools/pythonw.c Makefile
$(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ $(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include ../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
$(CC) $(LDFLAGS) -DPYTHONFRAMEWORK='"$(PYTHONFRAMEWORK)"' -o $@ \
$(srcdir)/Tools/pythonw.c -I.. -I$(srcdir)/../Include \
../$(PYTHONFRAMEWORK).framework/Versions/$(VERSION)/$(PYTHONFRAMEWORK)
install_PythonLauncher:
cd PythonLauncher && make install DESTDIR=$(DESTDIR)

View File

@ -148,6 +148,12 @@ PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET
# Option to install to strip binaries
STRIPFLAG=-s
# Flags to lipo to produce a 32-bit-only universal executable
LIPO_32BIT_FLAGS=@LIPO_32BIT_FLAGS@
# Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
@ -955,7 +961,7 @@ quicktest: all platform
$(TESTRUNNER) $(QUICKTESTOPTS)
install: altinstall bininstall maninstall
install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@
@ -983,7 +989,7 @@ $(DESTSHARED):
# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
altbininstall: $(BUILDPYTHON)
altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
@for i in $(BINDIR) $(LIBDIR); \
do \
if test ! -d $(DESTDIR)$$i; then \
@ -992,7 +998,11 @@ altbininstall: $(BUILDPYTHON)
else true; \
fi; \
done
$(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE)
if test "$(PYTHONFRAMEWORKDIR)" = "no-framework" ; then \
$(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
else \
$(INSTALL_PROGRAM) $(STRIPFLAG) Mac/pythonw $(DESTDIR)$(BINDIR)/python$(LDVERSION)$(EXE); \
fi
-if test "$(VERSION)" != "$(LDVERSION)"; then \
if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
@ -1013,6 +1023,12 @@ altbininstall: $(BUILDPYTHON)
fi; \
else true; \
fi
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
rm -f $(DESTDIR)$(BINDIR)python$(VERSION)-32$(EXE); \
lipo $(LIPO_32BIT_FLAGS) \
-output $(DESTDIR)$(BINDIR)/python$(VERSION)-32$(EXE) \
$(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
fi
bininstall: altbininstall
-if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \
@ -1038,6 +1054,10 @@ bininstall: altbininstall
(cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv)
if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \
rm -f $(DESTDIR)$(BINDIR)/python3-32$(EXE); \
(cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-32$(EXE) python3-32$(EXE)) \
fi
# Install the versioned manual page
altmaninstall:
@ -1364,7 +1384,14 @@ frameworkinstallmaclib:
frameworkinstallapps:
cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)"
# This install the unix python and pythonw tools in /usr/local/bin
# Build the bootstrap executable that will spawn the interpreter inside
# an app bundle within the framework. This allows the interpreter to
# run OS X GUI APIs.
frameworkpythonw:
cd Mac && $(MAKE) pythonw
# This installs the python* and other bin symlinks in $prefix/bin or in
# a bin directory relative to the framework root
frameworkinstallunixtools:
cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)"

View File

@ -357,6 +357,12 @@ Build
- Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9
screen refresh problem for OS X installer build.
- Issue #19649: On OS X, the same set of file names are now installed
in bin directories for all configurations: non-framework vs framework,
and single arch vs universal builds. pythonx.y-32 is now always
installed for 64-bit/32-bit universal builds. The obsolete and
undocumented pythonw* symlinks are no longer installed anywhere.
Tools/Demos
-----------

5
configure vendored
View File

@ -712,6 +712,7 @@ _PYTHON_HOST_PLATFORM
MACHDEP
FRAMEWORKINSTALLAPPSPREFIX
FRAMEWORKUNIXTOOLSPREFIX
FRAMEWORKPYTHONW
FRAMEWORKALTINSTALLLAST
FRAMEWORKALTINSTALLFIRST
FRAMEWORKINSTALLLAST
@ -3152,6 +3153,7 @@ if test "${enable_framework+set}" = set; then :
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE"; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@ -3166,6 +3168,7 @@ if test "${enable_framework+set}" = set; then :
FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
FRAMEWORKPYTHONW="frameworkpythonw"
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "x${prefix}" = "xNONE" ; then
@ -3233,6 +3236,7 @@ else
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE" ; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@ -3255,6 +3259,7 @@ fi
##AC_ARG_WITH(dyld,
## AS_HELP_STRING([--with-dyld],
## [Use (OpenStep|Rhapsody) dynamic linker]))

View File

@ -250,6 +250,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE"; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@ -264,6 +265,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
FRAMEWORKPYTHONW="frameworkpythonw"
FRAMEWORKINSTALLAPPSPREFIX="/Applications"
if test "x${prefix}" = "xNONE" ; then
@ -325,6 +327,7 @@ AC_ARG_ENABLE(framework,
FRAMEWORKINSTALLLAST=
FRAMEWORKALTINSTALLFIRST=
FRAMEWORKALTINSTALLLAST=
FRAMEWORKPYTHONW=
if test "x${prefix}" = "xNONE" ; then
FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
else
@ -342,6 +345,7 @@ AC_SUBST(FRAMEWORKINSTALLFIRST)
AC_SUBST(FRAMEWORKINSTALLLAST)
AC_SUBST(FRAMEWORKALTINSTALLFIRST)
AC_SUBST(FRAMEWORKALTINSTALLLAST)
AC_SUBST(FRAMEWORKPYTHONW)
AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)
AC_SUBST(FRAMEWORKINSTALLAPPSPREFIX)