From aa6a212a4eecd7062056707b4e7adf3690693a91 Mon Sep 17 00:00:00 2001 From: Ned Deily Date: Sat, 23 Nov 2013 03:30:11 -0800 Subject: [PATCH] Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1. --- Mac/BuildScript/README.txt | 29 ------------ Mac/BuildScript/build-installer.py | 66 +-------------------------- Mac/BuildScript/resources/ReadMe.txt | 37 +++++---------- Mac/BuildScript/resources/Welcome.rtf | 10 ++-- Misc/NEWS | 5 ++ 5 files changed, 25 insertions(+), 122 deletions(-) diff --git a/Mac/BuildScript/README.txt b/Mac/BuildScript/README.txt index 06f0fabc9f13ef..0a6b54455764f0 100644 --- a/Mac/BuildScript/README.txt +++ b/Mac/BuildScript/README.txt @@ -57,8 +57,6 @@ for each release. * NCurses 5.9 (http://bugs.python.org/issue15037) * SQLite 3.8.1 - * Tcl 8.5.15 - * Tk 8.5.15 * XZ 5.0.5 - uses system-supplied versions of third-party libraries @@ -67,33 +65,6 @@ for each release. - requires ActiveState Tcl/Tk 8.5.15 (or later) to be installed for building - * Beginning with Python 3.4 alpha2, this installer now includes its own - builtin copy of Tcl and Tk 8.5.15 libraries and thus is no longer - dependent on the buggy releases of Aqua Cocoa Tk 8.5 shipped with - OS X 10.6 or on installing a newer third-party version of Tcl/Tk - in /Library/Frameworks, such as from ActiveState. Because this - is a new feature, it should be considered somewhat experimental and - subject to change prior to the final release of Python 3.4. If it - is necessary to fallback to using a third-party Tcl/Tk because of - a problem with the builtin Tcl/Tk, there is a backup version of - the _tkinter extension included which will dynamically link to - Tcl and Tk frameworks in /Library/Frameworks as in previous releases. - To enable (for all users of this Python 3.4):: - - sudo bash - cd /Library/Frameworks/Python.framework/Versions/3.4 - cd ./lib/python3.4 - cp -p ./lib-tkinter/library/_tkinter.so ./lib-dynload - exit - - To restore using Python's builtin versions of Tcl and Tk:: - - sudo bash - cd /Library/Frameworks/Python.framework/Versions/3.4 - cd ./lib/python3.4 - cp -p ./lib-tkinter/builtin/_tkinter.so ./lib-dynload - exit - - recommended build environment: * Mac OS X 10.6.8 (or later) diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py index 1181a9653d1560..f01258731eb7bd 100755 --- a/Mac/BuildScript/build-installer.py +++ b/Mac/BuildScript/build-installer.py @@ -193,7 +193,8 @@ def library_recipes(): LT_10_5 = bool(DEPTARGET < '10.5') - if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): +# Disable for now + if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 5)): result.extend([ dict( name="Tcl 8.5.15", @@ -586,20 +587,6 @@ def checkEnvironment(): % frameworks['Tk'], ] - # For 10.6+ builds, we build two versions of _tkinter: - # - the traditional version (renamed to _tkinter_library.so) linked - # with /Library/Frameworks/{Tcl,Tk}.framework - # - the default version linked with our builtin copies of Tcl and Tk - if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): - EXPECTED_SHARED_LIBS['_tkinter_library.so'] = \ - EXPECTED_SHARED_LIBS['_tkinter.so'] - EXPECTED_SHARED_LIBS['_tkinter.so'] = [ - "/Library/Frameworks/Python.framework/Versions/%s/lib/libtcl%s.dylib" - % (getVersion(), frameworks['Tcl']), - "/Library/Frameworks/Python.framework/Versions/%s/lib/libtk%s.dylib" - % (getVersion(), frameworks['Tk']), - ] - # Remove inherited environment variables which might influence build environ_var_prefixes = ['CPATH', 'C_INCLUDE_', 'DYLD_', 'LANG', 'LC_', 'LD_', 'LIBRARY_', 'PATH', 'PYTHON'] @@ -987,23 +974,6 @@ def buildPython(): print("Running make") runCommand("make") - # For deployment targets of 10.6 and higher, we build our own version - # of Tcl and Cocoa Aqua Tk libs because the Apple-supplied Tk 8.5 is - # out-of-date and has critical bugs. Save the _tkinter.so that was - # linked with /Library/Frameworks/{Tck,Tk}.framework and build - # another _tkinter.so linked with our builtin Tcl and Tk libs. - if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): - runCommand("find build -name '_tkinter.so' " - " -execdir mv '{}' _tkinter_library.so \;") - print("Running make to build builtin _tkinter") - runCommand("make TCLTK_INCLUDES='-I%s/libraries/usr/local/include' " - "TCLTK_LIBS='-L%s/libraries/usr/local/lib -ltcl8.5 -ltk8.5'"%( - shellQuote(WORKDIR)[1:-1], - shellQuote(WORKDIR)[1:-1])) - # make a copy which will be moved to lib-tkinter later - runCommand("find build -name '_tkinter.so' " - " -execdir cp -p '{}' _tkinter_builtin.so \;") - print("Running make install") runCommand("make install DESTDIR=%s"%( shellQuote(rootDir))) @@ -1028,27 +998,11 @@ def buildPython(): 'Python.framework', 'Versions', version, 'lib', 'python%s'%(version,)) - # If we made multiple versions of _tkinter, move them to - # their own directories under python lib. This allows - # users to select which to import by manipulating sys.path - # directly or with PYTHONPATH. - - if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): - TKINTERS = ['builtin', 'library'] - tkinter_moves = [('_tkinter_' + tkn + '.so', - os.path.join(path_to_lib, 'lib-tkinter', tkn)) - for tkn in TKINTERS] - # Create the destination directories under lib-tkinter. - # The permissions and uid/gid will be fixed up next. - for tkm in tkinter_moves: - os.makedirs(tkm[1]) - print("Fix file modes") frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework') gid = grp.getgrnam('admin').gr_gid shared_lib_error = False - moves_list = [] for dirpath, dirnames, filenames in os.walk(frmDir): for dn in dirnames: os.chmod(os.path.join(dirpath, dn), STAT_0o775) @@ -1074,25 +1028,9 @@ def buildPython(): % (sl, p)) shared_lib_error = True - # If this is a _tkinter variant, move it to its own directory - # now that we have fixed its permissions and checked that it - # was linked properly. The directory was created earlier. - # The files are moved after the entire tree has been walked - # since the shared library checking depends on the files - # having unique names. - if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)): - for tkm in tkinter_moves: - if fn == tkm[0]: - moves_list.append( - (p, os.path.join(tkm[1], '_tkinter.so'))) - if shared_lib_error: fatal("Unexpected shared library errors.") - # Now do the moves. - for ml in moves_list: - shutil.move(ml[0], ml[1]) - if PYTHON_3: LDVERSION=None VERSION=None diff --git a/Mac/BuildScript/resources/ReadMe.txt b/Mac/BuildScript/resources/ReadMe.txt index 7e885338aeb575..63fa7e5f3b9fae 100644 --- a/Mac/BuildScript/resources/ReadMe.txt +++ b/Mac/BuildScript/resources/ReadMe.txt @@ -17,6 +17,17 @@ instead of double-clicking, control-click or right click the "Python" installer package icon. Then select "Open using ... Installer" from the contextual menu that appears. + **** IMPORTANT **** + +Update your version of Tcl/Tk to use IDLE or other Tk applications +================================================================== + +To use IDLE or other programs that use the Tkinter graphical user +interface toolkit, you may need to install a newer third-party version +of the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/ +for current information about supported and recommended versions of +Tcl/Tk for this version of Python and of Mac OS X. + **NEW* As of Python 3.4.0b1: New Installation Options and Defaults @@ -47,32 +58,6 @@ use pip with Python 2.7.x, you will need to download and install a separate copy of it from the Python Package Index (https://pypi.python.org/pypi). - - **** IMPORTANT changes if you use IDLE and Tkinter **** - -Installing a third-party version of Tcl/Tk is no longer required -================================================================ - -Beginning with Python 3.4 alpha2, the 10.6+ 64-bit installer now -comes with its own private copy of Tcl and Tk 8.5 libraries. For -this version of Python, it is no longer necessary to install -a third-party version of Tcl/Tk 8.5, such as those from ActiveState, -to work around the problematic versions of Tcl/Tk 8.5 shipped by -Apple in OS X 10.6 and later. (This does not change the requirements -for older versions of Python installed from python.org.) By default, -this version of Python will always use its own private version, -regardless of whether a third-party Tcl/Tk is installed. -The 10.5+ 32-bit-only installer continues to use Tcl/Tk 8.4, -either a third-party or system-supplied version. -Since this is a new feature, it should be considered somewhat -experimental and subject to change prior to the final release of -Python 3.4. Please report any problems found to the Python bug -tracker at http://bugs.python.org. - -Visit http://www.python.org/download/mac/tcltk/ -for current information about supported and recommended versions of -Tcl/Tk for this version of Python and of Mac OS X. - Using this version of Python on OS X ==================================== diff --git a/Mac/BuildScript/resources/Welcome.rtf b/Mac/BuildScript/resources/Welcome.rtf index 78d6f9b466cba2..886ebfecabb4b6 100644 --- a/Mac/BuildScript/resources/Welcome.rtf +++ b/Mac/BuildScript/resources/Welcome.rtf @@ -29,7 +29,11 @@ for an overview. See the ReadMe file and the Python documentation for more information.\ \ -\b IMPORTANT for users of IDLE and tkinter: -\b0 Beginning with Python 3.4 alpha 2, it is no longer necessary to install third-party versions of the +\b IMPORTANT: +\b0 +\b IDLE +\b0 and other programs using the +\b tkinter +\b0 graphical user interface toolkit require specific versions of the \b Tcl/Tk -\b0 platform independent windowing toolkit. Please read the ReadMe file and visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for more information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file +\b0 platform independent windowing toolkit. Visit {\field{\*\fldinst{HYPERLINK "http://www.python.org/download/mac/tcltk/"}}{\fldrslt http://www.python.org/download/mac/tcltk/}} for current information on supported and recommended versions of Tcl/Tk for this version of Python and Mac OS X.} \ No newline at end of file diff --git a/Misc/NEWS b/Misc/NEWS index 5f7cf21340cfe7..ed04e36b4250b5 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -401,6 +401,11 @@ Build xz 5.0.3 -> 5.0.5 SQLite 3.7.13 -> 3.8.1 +- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1. + Some third-party projects, such as Matplotlib and PIL/Pillow, + depended on being able to build with Tcl and Tk frameworks in + /Library/Frameworks. + Tools/Demos -----------