You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/virtualenv/files/virtualenv-1.9.1-pypy.patch

52 lines
2.5 KiB

mkdtemp works against pypy's libdir
diff -ur virtualenv-1.9.1.orig/tests/test_virtualenv.py virtualenv-1.9.1/tests/test_virtualenv.py
--- virtualenv-1.9.1.orig/tests/test_virtualenv.py 2013-03-08 07:14:17.000000000 +0800
+++ virtualenv-1.9.1/tests/test_virtualenv.py 2013-03-21 21:59:59.180297883 +0800
@@ -97,27 +97,28 @@
cop.update_defaults(defaults)
assert defaults == {'system_site_packages': 0}
-def test_install_python_bin():
- """Should create the right python executables and links"""
- tmp_virtualenv = tempfile.mkdtemp()
- try:
- home_dir, lib_dir, inc_dir, bin_dir = \
+if not hasattr(sys, 'pypy_version_info'):
+ def test_install_python_bin():
+ """Should create the right python executables and links"""
+ tmp_virtualenv = tempfile.mkdtemp()
+ try:
+ home_dir, lib_dir, inc_dir, bin_dir = \
virtualenv.path_locations(tmp_virtualenv)
- virtualenv.install_python(home_dir, lib_dir, inc_dir, bin_dir, False,
+ virtualenv.install_python(home_dir, lib_dir, inc_dir, bin_dir, False,
False)
- if virtualenv.is_win:
- required_executables = [ 'python.exe', 'pythonw.exe']
- else:
- py_exe_no_version = 'python'
- py_exe_version_major = 'python%s' % sys.version_info[0]
- py_exe_version_major_minor = 'python%s.%s' % (
- sys.version_info[0], sys.version_info[1])
- required_executables = [ py_exe_no_version, py_exe_version_major,
+ if virtualenv.is_win:
+ required_executables = [ 'python.exe', 'pythonw.exe']
+ else:
+ py_exe_no_version = 'python'
+ py_exe_version_major = 'python%s' % sys.version_info[0]
+ py_exe_version_major_minor = 'python%s.%s' % (
+ sys.version_info[0], sys.version_info[1])
+ required_executables = [ py_exe_no_version, py_exe_version_major,
py_exe_version_major_minor ]
- for pth in required_executables:
- assert os.path.exists(os.path.join(bin_dir, pth)), ("%s should "
+ for pth in required_executables:
+ assert os.path.exists(os.path.join(bin_dir, pth)), ("%s should "
"exist in bin_dir" % pth)
- finally:
- shutil.rmtree(tmp_virtualenv)
+ finally:
+ shutil.rmtree(tmp_virtualenv)