diff options
author | Matt Iversen <teh.ivo@gmail.com> | 2016-04-14 22:20:24 +1000 |
---|---|---|
committer | Matt Iversen <teh.ivo@gmail.com> | 2016-04-14 22:20:24 +1000 |
commit | cb368e987476970ac32fe1f630a80ecbb980d58b (patch) | |
tree | 554a2621b055ddc75ae5159e172190e053b9c227 /virtualenv.py | |
parent | 998330cd9e83d92df3e9fc0a4fd2b4426c63c954 (diff) | |
parent | f55ad3fb471a00123875850b3f099287b09ee460 (diff) | |
download | virtualenv-cb368e987476970ac32fe1f630a80ecbb980d58b.tar.gz |
Merge pull request #888 from techtonik/tcltk
Fix issue #93 - Tcl doesn't work inside a virtualenv on Windows
Diffstat (limited to 'virtualenv.py')
-rwxr-xr-x | virtualenv.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/virtualenv.py b/virtualenv.py index 120cbb1..4608a14 100755 --- a/virtualenv.py +++ b/virtualenv.py @@ -1062,6 +1062,16 @@ def copy_required_modules(dst_prefix, symlink): if os.path.exists(pyfile): copyfile(pyfile, dst_filename[:-1], symlink) +def copy_tcltk(src, dest, symlink): + """ copy tcl/tk libraries on Windows (issue #93) """ + if majver == 2: + libver = '8.5' + else: + libver = '8.6' + for name in ['tcl', 'tk']: + srcdir = src + '/tcl/' + name + libver + dstdir = dest + '/tcl/' + name + libver + copyfileordir(srcdir, dstdir, symlink) def subst_path(prefix_path, prefix, home_dir): prefix_path = os.path.normpath(prefix_path) @@ -1118,6 +1128,9 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy copy_required_modules(home_dir, symlink) finally: logger.indent -= 2 + # ...copy tcl/tk + if is_win: + copy_tcltk(prefix, home_dir, symlink) mkdir(join(lib_dir, 'site-packages')) import site site_filename = site.__file__ |