Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa6a212

Browse files
committed
Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1.
1 parent 2427b50 commit aa6a212

5 files changed

Lines changed: 25 additions & 122 deletions

File tree

Mac/BuildScript/README.txt

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ for each release.
5757

5858
* NCurses 5.9 (http://bugs.python.org/issue15037)
5959
* SQLite 3.8.1
60-
* Tcl 8.5.15
61-
* Tk 8.5.15
6260
* XZ 5.0.5
6361

6462
- uses system-supplied versions of third-party libraries
@@ -67,33 +65,6 @@ for each release.
6765

6866
- requires ActiveState Tcl/Tk 8.5.15 (or later) to be installed for building
6967

70-
* Beginning with Python 3.4 alpha2, this installer now includes its own
71-
builtin copy of Tcl and Tk 8.5.15 libraries and thus is no longer
72-
dependent on the buggy releases of Aqua Cocoa Tk 8.5 shipped with
73-
OS X 10.6 or on installing a newer third-party version of Tcl/Tk
74-
in /Library/Frameworks, such as from ActiveState. Because this
75-
is a new feature, it should be considered somewhat experimental and
76-
subject to change prior to the final release of Python 3.4. If it
77-
is necessary to fallback to using a third-party Tcl/Tk because of
78-
a problem with the builtin Tcl/Tk, there is a backup version of
79-
the _tkinter extension included which will dynamically link to
80-
Tcl and Tk frameworks in /Library/Frameworks as in previous releases.
81-
To enable (for all users of this Python 3.4)::
82-
83-
sudo bash
84-
cd /Library/Frameworks/Python.framework/Versions/3.4
85-
cd ./lib/python3.4
86-
cp -p ./lib-tkinter/library/_tkinter.so ./lib-dynload
87-
exit
88-
89-
To restore using Python's builtin versions of Tcl and Tk::
90-
91-
sudo bash
92-
cd /Library/Frameworks/Python.framework/Versions/3.4
93-
cd ./lib/python3.4
94-
cp -p ./lib-tkinter/builtin/_tkinter.so ./lib-dynload
95-
exit
96-
9768
- recommended build environment:
9869

9970
* Mac OS X 10.6.8 (or later)

Mac/BuildScript/build-installer.py

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ def library_recipes():
193193

194194
LT_10_5 = bool(DEPTARGET < '10.5')
195195

196-
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
196+
# Disable for now
197+
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 5)):
197198
result.extend([
198199
dict(
199200
name="Tcl 8.5.15",
@@ -586,20 +587,6 @@ def checkEnvironment():
586587
% frameworks['Tk'],
587588
]
588589

589-
# For 10.6+ builds, we build two versions of _tkinter:
590-
# - the traditional version (renamed to _tkinter_library.so) linked
591-
# with /Library/Frameworks/{Tcl,Tk}.framework
592-
# - the default version linked with our builtin copies of Tcl and Tk
593-
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
594-
EXPECTED_SHARED_LIBS['_tkinter_library.so'] = \
595-
EXPECTED_SHARED_LIBS['_tkinter.so']
596-
EXPECTED_SHARED_LIBS['_tkinter.so'] = [
597-
"/Library/Frameworks/Python.framework/Versions/%s/lib/libtcl%s.dylib"
598-
% (getVersion(), frameworks['Tcl']),
599-
"/Library/Frameworks/Python.framework/Versions/%s/lib/libtk%s.dylib"
600-
% (getVersion(), frameworks['Tk']),
601-
]
602-
603590
# Remove inherited environment variables which might influence build
604591
environ_var_prefixes = ['CPATH', 'C_INCLUDE_', 'DYLD_', 'LANG', 'LC_',
605592
'LD_', 'LIBRARY_', 'PATH', 'PYTHON']
@@ -987,23 +974,6 @@ def buildPython():
987974
print("Running make")
988975
runCommand("make")
989976

990-
# For deployment targets of 10.6 and higher, we build our own version
991-
# of Tcl and Cocoa Aqua Tk libs because the Apple-supplied Tk 8.5 is
992-
# out-of-date and has critical bugs. Save the _tkinter.so that was
993-
# linked with /Library/Frameworks/{Tck,Tk}.framework and build
994-
# another _tkinter.so linked with our builtin Tcl and Tk libs.
995-
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
996-
runCommand("find build -name '_tkinter.so' "
997-
" -execdir mv '{}' _tkinter_library.so \;")
998-
print("Running make to build builtin _tkinter")
999-
runCommand("make TCLTK_INCLUDES='-I%s/libraries/usr/local/include' "
1000-
"TCLTK_LIBS='-L%s/libraries/usr/local/lib -ltcl8.5 -ltk8.5'"%(
1001-
shellQuote(WORKDIR)[1:-1],
1002-
shellQuote(WORKDIR)[1:-1]))
1003-
# make a copy which will be moved to lib-tkinter later
1004-
runCommand("find build -name '_tkinter.so' "
1005-
" -execdir cp -p '{}' _tkinter_builtin.so \;")
1006-
1007977
print("Running make install")
1008978
runCommand("make install DESTDIR=%s"%(
1009979
shellQuote(rootDir)))
@@ -1028,27 +998,11 @@ def buildPython():
1028998
'Python.framework', 'Versions',
1029999
version, 'lib', 'python%s'%(version,))
10301000

1031-
# If we made multiple versions of _tkinter, move them to
1032-
# their own directories under python lib. This allows
1033-
# users to select which to import by manipulating sys.path
1034-
# directly or with PYTHONPATH.
1035-
1036-
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
1037-
TKINTERS = ['builtin', 'library']
1038-
tkinter_moves = [('_tkinter_' + tkn + '.so',
1039-
os.path.join(path_to_lib, 'lib-tkinter', tkn))
1040-
for tkn in TKINTERS]
1041-
# Create the destination directories under lib-tkinter.
1042-
# The permissions and uid/gid will be fixed up next.
1043-
for tkm in tkinter_moves:
1044-
os.makedirs(tkm[1])
1045-
10461001
print("Fix file modes")
10471002
frmDir = os.path.join(rootDir, 'Library', 'Frameworks', 'Python.framework')
10481003
gid = grp.getgrnam('admin').gr_gid
10491004

10501005
shared_lib_error = False
1051-
moves_list = []
10521006
for dirpath, dirnames, filenames in os.walk(frmDir):
10531007
for dn in dirnames:
10541008
os.chmod(os.path.join(dirpath, dn), STAT_0o775)
@@ -1074,25 +1028,9 @@ def buildPython():
10741028
% (sl, p))
10751029
shared_lib_error = True
10761030

1077-
# If this is a _tkinter variant, move it to its own directory
1078-
# now that we have fixed its permissions and checked that it
1079-
# was linked properly. The directory was created earlier.
1080-
# The files are moved after the entire tree has been walked
1081-
# since the shared library checking depends on the files
1082-
# having unique names.
1083-
if (DEPTARGET > '10.5') and (getVersionTuple() >= (3, 4)):
1084-
for tkm in tkinter_moves:
1085-
if fn == tkm[0]:
1086-
moves_list.append(
1087-
(p, os.path.join(tkm[1], '_tkinter.so')))
1088-
10891031
if shared_lib_error:
10901032
fatal("Unexpected shared library errors.")
10911033

1092-
# Now do the moves.
1093-
for ml in moves_list:
1094-
shutil.move(ml[0], ml[1])
1095-
10961034
if PYTHON_3:
10971035
LDVERSION=None
10981036
VERSION=None

Mac/BuildScript/resources/ReadMe.txt

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ instead of double-clicking, control-click or right click the "Python"
1717
installer package icon. Then select "Open using ... Installer" from
1818
the contextual menu that appears.
1919

20+
**** IMPORTANT ****
21+
22+
Update your version of Tcl/Tk to use IDLE or other Tk applications
23+
==================================================================
24+
25+
To use IDLE or other programs that use the Tkinter graphical user
26+
interface toolkit, you may need to install a newer third-party version
27+
of the Tcl/Tk frameworks. Visit http://www.python.org/download/mac/tcltk/
28+
for current information about supported and recommended versions of
29+
Tcl/Tk for this version of Python and of Mac OS X.
30+
2031
**NEW* As of Python 3.4.0b1:
2132

2233
New Installation Options and Defaults
@@ -47,32 +58,6 @@ use pip with Python 2.7.x, you will need to download and install a
4758
separate copy of it from the Python Package Index
4859
(https://pypi.python.org/pypi).
4960

50-
51-
**** IMPORTANT changes if you use IDLE and Tkinter ****
52-
53-
Installing a third-party version of Tcl/Tk is no longer required
54-
================================================================
55-
56-
Beginning with Python 3.4 alpha2, the 10.6+ 64-bit installer now
57-
comes with its own private copy of Tcl and Tk 8.5 libraries. For
58-
this version of Python, it is no longer necessary to install
59-
a third-party version of Tcl/Tk 8.5, such as those from ActiveState,
60-
to work around the problematic versions of Tcl/Tk 8.5 shipped by
61-
Apple in OS X 10.6 and later. (This does not change the requirements
62-
for older versions of Python installed from python.org.) By default,
63-
this version of Python will always use its own private version,
64-
regardless of whether a third-party Tcl/Tk is installed.
65-
The 10.5+ 32-bit-only installer continues to use Tcl/Tk 8.4,
66-
either a third-party or system-supplied version.
67-
Since this is a new feature, it should be considered somewhat
68-
experimental and subject to change prior to the final release of
69-
Python 3.4. Please report any problems found to the Python bug
70-
tracker at http://bugs.python.org.
71-
72-
Visit http://www.python.org/download/mac/tcltk/
73-
for current information about supported and recommended versions of
74-
Tcl/Tk for this version of Python and of Mac OS X.
75-
7661
Using this version of Python on OS X
7762
====================================
7863

Mac/BuildScript/resources/Welcome.rtf

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
for an overview. See the ReadMe file and the Python documentation for more information.\
3030
\
3131

32-
\b IMPORTANT for users of IDLE and tkinter:
33-
\b0 Beginning with Python 3.4 alpha 2, it is no longer necessary to install third-party versions of the
32+
\b IMPORTANT:
33+
\b0
34+
\b IDLE
35+
\b0 and other programs using the
36+
\b tkinter
37+
\b0 graphical user interface toolkit require specific versions of the
3438
\b Tcl/Tk
35-
\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.}
39+
\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.}

Misc/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,11 @@ Build
401401
xz 5.0.3 -> 5.0.5
402402
SQLite 3.7.13 -> 3.8.1
403403

404+
- Issue #15663: Revert OS X installer built-in Tcl/Tk support for 3.4.0b1.
405+
Some third-party projects, such as Matplotlib and PIL/Pillow,
406+
depended on being able to build with Tcl and Tk frameworks in
407+
/Library/Frameworks.
408+
404409
Tools/Demos
405410
-----------
406411

0 commit comments

Comments
 (0)