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

Skip to content

Commit 6e47a33

Browse files
committed
Tkinter, step 5: remove lib-tk subdirectory and update all places where it was mentioned.
1 parent 2e08136 commit 6e47a33

10 files changed

Lines changed: 18 additions & 24 deletions

File tree

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ PLATMACDIRS= plat-mac plat-mac/Carbon plat-mac/lib-scriptpackages \
808808
plat-mac/lib-scriptpackages/SystemEvents \
809809
plat-mac/lib-scriptpackages/Terminal
810810
PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages
811-
LIBSUBDIRS= lib-tk site-packages test test/output test/data \
811+
LIBSUBDIRS= tkinter site-packages test test/output test/data \
812812
test/decimaltestdata \
813813
encodings \
814814
email email/mime email/test email/test/data \

Misc/RPM/python-3.0.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ rm -f mainpkg.files tools.files
376376
%if %{include_tkinter}
377377
%files tkinter
378378
%defattr(-,root,root)
379-
%{__prefix}/%{libdirname}/python%{libvers}/lib-tk
379+
%{__prefix}/%{libdirname}/python%{libvers}/tkinter
380380
%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload/_tkinter.so*
381381
%endif
382382

Modules/Setup.dist

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,7 @@ TESTPATH=
9494
MACHDEPPATH=:plat-$(MACHDEP)
9595
EXTRAMACHDEPPATH=
9696

97-
# Path component for the Tkinter-related modules
98-
# The TKPATH variable is always enabled, to save you the effort.
99-
TKPATH=:lib-tk
100-
101-
COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)$(TKPATH)
97+
COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(EXTRAMACHDEPPATH)
10298
PYTHONPATH=$(COREPYTHONPATH)
10399

104100

PC/VS7.1/python.iss

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ Source: Lib\lib-old\*.*; DestDir: {app}\Lib\lib-old; CopyMode: alwaysoverwrite;
180180
Source: Lib\xml\*.*; DestDir: {app}\Lib\xml; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
181181
Source: Lib\hotshot\*.*; DestDir: {app}\Lib\hotshot; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
182182
Source: Lib\test\*.*; DestDir: {app}\Lib\test; CopyMode: alwaysoverwrite; Components: test; Flags: recursesubdirs
183+
Source: Lib\tkinter\*.py; DestDir: {app}\Lib\tkinter; CopyMode: alwaysoverwrite; Components: tk; Flags: recursesubdirs
183184

184185
Source: Lib\site-packages\README.txt; DestDir: {app}\Lib\site-packages; CopyMode: alwaysoverwrite; Components: main
185186

@@ -188,8 +189,6 @@ Source: Lib\site-packages\win32\*.*; DestDir: {app}\Lib\site-packages\win32; Cop
188189
Source: Lib\site-packages\win32com\*.*; DestDir: {app}\Lib\site-packages\win32com; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
189190
Source: Lib\site-packages\win32comext\*.*; DestDir: {app}\Lib\site-packages\win32comext; CopyMode: alwaysoverwrite; Components: main; Flags: recursesubdirs
190191

191-
Source: Lib\lib-tk\*.py; DestDir: {app}\Lib\lib-tk; CopyMode: alwaysoverwrite; Components: tk; Flags: recursesubdirs
192-
193192
Source: include\*.h; DestDir: {app}\include; CopyMode: alwaysoverwrite; Components: main
194193

195194
Source: Tools\idle\*.*; DestDir: {app}\Tools\idle; CopyMode: alwaysoverwrite; Components: tk; Flags: recursesubdirs
@@ -239,7 +238,6 @@ Root: HKLM; Subkey: SOFTWARE\Python; Flags: uninsdeletekeyifempty; Check: IsAdmi
239238
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore; Flags: uninsdeletekeyifempty
240239
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2; Flags: uninsdeletekeyifempty
241240
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath; ValueData: "{app}\Lib;{app}\DLLs"; Flags: uninsdeletekeyifempty
242-
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath\tk; ValueData: {app}\Lib\lib-tk; Flags: uninsdeletekey; Components: tk
243241
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath\win32; ValueData: "{app}\lib\site-packages\win32;{app}\lib\site-packages\win32\lib"; Flags: uninsdeletekey
244242
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\PythonPath\win32com; ValueData: C:\Python\lib\site-packages; Flags: uninsdeletekey
245243
Root: HKLM; Subkey: SOFTWARE\Python\PythonCore\2.2\Modules; Flags: uninsdeletekeyifempty
@@ -294,9 +292,9 @@ Name: {app}\Lib\hotshot; Type: dirifempty
294292
Name: {app}\Lib\lib-old\*.pyc; Type: files
295293
Name: {app}\Lib\lib-old\*.pyo; Type: files
296294
Name: {app}\Lib\lib-old; Type: dirifempty
297-
Name: {app}\Lib\lib-tk\*.pyc; Type: files
298-
Name: {app}\Lib\lib-tk\*.pyo; Type: files
299-
Name: {app}\Lib\lib-tk; Type: dirifempty
295+
Name: {app}\Lib\tkinter\*.pyc; Type: files
296+
Name: {app}\Lib\tkinter\*.pyo; Type: files
297+
Name: {app}\Lib\tkinter; Type: dirifempty
300298
Name: {app}\Lib\test\*.pyc; Type: files
301299
Name: {app}\Lib\test\*.pyo; Type: files
302300
Name: {app}\Lib\test; Type: dirifempty

PC/VS7.1/python20.wse

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,8 +2040,8 @@ end
20402040
item: Remark
20412041
end
20422042
item: Install File
2043-
Source=..\lib\lib-tk\*.py
2044-
Destination=%MAINDIR%\Lib\lib-tk
2043+
Source=..\lib\tkinter\*.py
2044+
Destination=%MAINDIR%\Lib\tkinter
20452045
Description=Tkinter related library modules
20462046
Flags=0000000000000010
20472047
end
@@ -2726,7 +2726,7 @@ end
27262726
item: Edit Registry
27272727
Total Keys=1
27282728
Key=Software\Python\PythonCore\%PY_VERSION%\PythonPath
2729-
New Value=%MAINDIR%\Lib;%MAINDIR%\DLLs;%MAINDIR%\Lib\lib-tk
2729+
New Value=%MAINDIR%\Lib;%MAINDIR%\DLLs
27302730
New Value=
27312731
Root=2
27322732
end
@@ -2764,7 +2764,7 @@ end
27642764
item: Edit Registry
27652765
Total Keys=1
27662766
Key=Software\Python\PythonCore\%PY_VERSION%\PythonPath
2767-
New Value=%MAINDIR%\Lib;%MAINDIR%\DLLs;%MAINDIR%\Lib\lib-tk
2767+
New Value=%MAINDIR%\Lib;%MAINDIR%\DLLs
27682768
New Value=
27692769
Root=1
27702770
end

PC/getpathp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
is set, we believe it. Otherwise, we use the path of our host .EXE's
2626
to try and locate our "landmark" (lib\\os.py) and deduce our home.
2727
- If we DO have a Python Home: The relevant sub-directories (Lib,
28-
plat-win, lib-tk, etc) are based on the Python Home
28+
plat-win, etc) are based on the Python Home
2929
- If we DO NOT have a Python Home, the core Python Path is
3030
loaded from the registry. This is the main PythonPath key,
3131
and both HKLM and HKCU are combined to form the path)

PC/os2emx/getpathp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
is set, we believe it. Otherwise, we use the path of our host .EXE's
1818
to try and locate our "landmark" (lib\\os.py) and deduce our home.
1919
- If we DO have a Python Home: The relevant sub-directories (Lib,
20-
plat-win, lib-tk, etc) are based on the Python Home
20+
plat-win, etc) are based on the Python Home
2121
- If we DO NOT have a Python Home, the core Python Path is
2222
loaded from the registry. This is the main PythonPath key,
2323
and both HKLM and HKCU are combined to form the path)

PC/os2vacpp/pyconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
#define PYCC_VACPP /* Define Indicator of C Compiler */
6767

6868
/* Platform Filesystem */
69-
#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
69+
#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win"
7070
#define DOSFILESYS /* OS/2 Uses the DOS File Naming Conventions */
7171
/* #define IMPORT_8x3_NAMES (let's move up to long filenames) */
7272

PC/pyconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ WIN32 is still required for the locale module.
8080
#define MS_WIN32 /* only support win32 and greater. */
8181
#define MS_WINDOWS
8282
#ifndef PYTHONPATH
83-
# define PYTHONPATH L".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
83+
# define PYTHONPATH L".\\DLLs;.\\lib;.\\lib\\plat-win"
8484
#endif
8585
#define NT_THREADS
8686
#define WITH_THREAD

Tools/msi/msi.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,14 +910,14 @@ def add_files(db):
910910
print("WARNING: _ctypes.pyd not found, ctypes will not be included")
911911
extensions.remove("_ctypes.pyd")
912912

913-
# Add all .py files in Lib, except lib-tk, test
913+
# Add all .py files in Lib, except tkinter, test
914914
dirs={}
915915
pydirs = [(root,"Lib")]
916916
while pydirs:
917917
parent, dir = pydirs.pop()
918918
if dir == ".svn" or dir.startswith("plat-"):
919919
continue
920-
elif dir in ["lib-tk", "idlelib", "Icons"]:
920+
elif dir in ["tkinter", "idlelib", "Icons"]:
921921
if not have_tcl:
922922
continue
923923
tcltk.set_current()
@@ -1186,7 +1186,7 @@ def add_registry(db):
11861186
("InstallGroup", -1, prefix+r"\InstallPath\InstallGroup", "",
11871187
"Python %s" % short_version, "REGISTRY"),
11881188
("PythonPath", -1, prefix+r"\PythonPath", "",
1189-
r"[TARGETDIR]Lib;[TARGETDIR]DLLs;[TARGETDIR]Lib\lib-tk", "REGISTRY"),
1189+
r"[TARGETDIR]Lib;[TARGETDIR]DLLs", "REGISTRY"),
11901190
("Documentation", -1, prefix+r"\Help\Main Python Documentation", "",
11911191
"[TARGETDIR]Doc\\"+docfile , "REGISTRY.doc"),
11921192
("Modules", -1, prefix+r"\Modules", "+", None, "REGISTRY"),

0 commit comments

Comments
 (0)