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

View File

@ -148,6 +148,12 @@ PYTHONFRAMEWORKINSTALLDIR= @PYTHONFRAMEWORKINSTALLDIR@
MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@
@EXPORT_MACOSX_DEPLOYMENT_TARGET@export 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) # Options to enable prebinding (for fast startup prior to Mac OS X 10.3)
OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@ OTHER_LIBTOOL_OPT=@OTHER_LIBTOOL_OPT@
@ -955,7 +961,7 @@ quicktest: all platform
$(TESTRUNNER) $(QUICKTESTOPTS) $(TESTRUNNER) $(QUICKTESTOPTS)
install: altinstall bininstall maninstall install: @FRAMEWORKINSTALLFIRST@ altinstall bininstall maninstall @FRAMEWORKINSTALLLAST@
altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \ altinstall: @FRAMEWORKALTINSTALLFIRST@ altbininstall libinstall inclinstall libainstall \
sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@ sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@
@ -983,7 +989,7 @@ $(DESTSHARED):
# Install the interpreter with $(VERSION) affixed # Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix) # This goes into $(exec_prefix)
altbininstall: $(BUILDPYTHON) altbininstall: $(BUILDPYTHON) @FRAMEWORKPYTHONW@
@for i in $(BINDIR) $(LIBDIR); \ @for i in $(BINDIR) $(LIBDIR); \
do \ do \
if test ! -d $(DESTDIR)$$i; then \ if test ! -d $(DESTDIR)$$i; then \
@ -992,7 +998,11 @@ altbininstall: $(BUILDPYTHON)
else true; \ else true; \
fi; \ fi; \
done 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 "$(VERSION)" != "$(LDVERSION)"; then \
if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ if test -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -o -h $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \ then rm -f $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
@ -1013,6 +1023,12 @@ altbininstall: $(BUILDPYTHON)
fi; \ fi; \
else true; \ else true; \
fi 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 bininstall: altbininstall
-if test -f $(DESTDIR)$(BINDIR)/python3$(EXE) -o -h $(DESTDIR)$(BINDIR)/python3$(EXE); \ -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) (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3)
-rm -f $(DESTDIR)$(BINDIR)/pyvenv -rm -f $(DESTDIR)$(BINDIR)/pyvenv
(cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) 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 # Install the versioned manual page
altmaninstall: altmaninstall:
@ -1364,7 +1384,14 @@ frameworkinstallmaclib:
frameworkinstallapps: frameworkinstallapps:
cd Mac && $(MAKE) installapps DESTDIR="$(DESTDIR)" 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: frameworkinstallunixtools:
cd Mac && $(MAKE) installunixtools DESTDIR="$(DESTDIR)" 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 - Issue #19373: Apply upstream change to Tk 8.5.15 fixing OS X 10.9
screen refresh problem for OS X installer build. 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 Tools/Demos
----------- -----------

5
configure vendored
View File

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

View File

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