Skip to content

Commit fead5d4

Browse files
committed
Generically search for correct Tcl/Tk to add
Fixes #937
1 parent 7d123e2 commit fead5d4

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

virtualenv.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,15 +1067,14 @@ def copy_required_modules(dst_prefix, symlink):
10671067

10681068
def copy_tcltk(src, dest, symlink):
10691069
""" copy tcl/tk libraries on Windows (issue #93) """
1070-
if majver == 2:
1071-
libver = '8.5'
1072-
else:
1073-
libver = '8.6'
1074-
for name in ['tcl', 'tk']:
1075-
srcdir = src + '/tcl/' + name + libver
1076-
dstdir = dest + '/tcl/' + name + libver
1077-
if os.path.exists(srcdir) and not os.path.exists(dstdir):
1078-
copyfileordir(srcdir, dstdir, symlink)
1070+
for libversion in '8.5', '8.6':
1071+
for libname in 'tcl', 'tk':
1072+
srcdir = join(src, 'tcl', libname + libversion)
1073+
destdir = join(dest, 'tcl', libname + libversion)
1074+
# Only copy the dirs from the above combinations that exist
1075+
if os.path.exists(srcdir) and not os.path.exists(destdir):
1076+
copyfileordir(srcdir, destdir, symlink)
1077+
10791078

10801079
def subst_path(prefix_path, prefix, home_dir):
10811080
prefix_path = os.path.normpath(prefix_path)

0 commit comments

Comments
 (0)