summary refs log tree commit diff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorCillian de Róiste <goibhniu@fsfe.org>2013-01-17 00:18:02 +0100
committerCillian de Róiste <goibhniu@fsfe.org>2013-01-17 00:18:02 +0100
commitb85a093b07eb7377f792daeb6a13b32d1e0d6e75 (patch)
treea85a8916a65647afc58c4f7c9ac326ad0e60eab2 /pkgs/development/python-modules
parentf1054e5051dd7c604655309166d9ca960ee406f3 (diff)
downloadnixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.tar
nixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.tar.gz
nixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.tar.bz2
nixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.tar.lz
nixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.tar.xz
nixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.tar.zst
nixpkgs-b85a093b07eb7377f792daeb6a13b32d1e0d6e75.zip
pythonPackages.virtualenv: update to 1.8.4
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/virtualenv-change-prefix.patch27
1 files changed, 15 insertions, 12 deletions
diff --git a/pkgs/development/python-modules/virtualenv-change-prefix.patch b/pkgs/development/python-modules/virtualenv-change-prefix.patch
index 5093fdbead9..d3e588bd1cd 100644
--- a/pkgs/development/python-modules/virtualenv-change-prefix.patch
+++ b/pkgs/development/python-modules/virtualenv-change-prefix.patch
@@ -1,29 +1,32 @@
 Without this patch `virtualenv --python=python2.7 .` fails with an error because it notices that the python readline.so is not in the same path as python2.7. I assume this is to avoid copying the wrong file on systems where it is possible to find incompatible libraries by accident. Adding "/nix/store" to the prefix fixes this problem. Unfortunately readline is still not available if you just run `virtualenv .`.
 
-
---- virtualenv-1.6.4/virtualenv.py	2012-05-20 00:40:38.070649647 +0200
-+++ virtualenv-1.6.4/virtualenv.py	2012-05-20 00:45:10.596242604 +0200
-@@ -951,13 +951,7 @@
+--- virtualenv-1.8.4/virtualenv.py        2013-01-16 23:43:37.583615220 +0100
++++ virtualenv-1.8.4/virtualenv.py        2013-01-16 23:44:47.885973431 +0100
+@@ -1135,17 +1135,7 @@
  
  
  def change_prefix(filename, dst_prefix):
 -    prefixes = [sys.prefix]
 -
--    if sys.platform == "darwin":
+-    if is_darwin:
 -        prefixes.extend((
 -            os.path.join("/Library/Python", sys.version[:3], "site-packages"),
 -            os.path.join(sys.prefix, "Extras", "lib", "python"),
--            os.path.join("~", "Library", "Python", sys.version[:3], "site-packages")))
+-            os.path.join("~", "Library", "Python", sys.version[:3], "site-packages"),
+-            # Python 2.6 no-frameworks
+-            os.path.join("~", ".local", "lib","python", sys.version[:3], "site-packages"),
+-            # System Python 2.7 on OSX Mountain Lion
+-            os.path.join("~", "Library", "Python", sys.version[:3], "lib", "python", "site-packages")))
 +    prefixes = ["/nix/store", sys.prefix]
  
      if hasattr(sys, 'real_prefix'):
          prefixes.append(sys.real_prefix)
-@@ -968,6 +962,8 @@
-             _, relpath = filename.split(src_prefix, 1)
-             assert relpath[0] == os.sep
-             relpath = relpath[1:]
-+            if src_prefix == "/nix/store":
-+                relpath = "/".join(relpath.split("/")[1:])
+@@ -1162,6 +1152,8 @@
+             if src_prefix != os.sep: # sys.prefix == "/"
+                 assert relpath[0] == os.sep
+                 relpath = relpath[1:]
++                if src_prefix == "/nix/store":
++                    relpath = "/".join(relpath.split("/")[1:])
              return join(dst_prefix, relpath)
      assert False, "Filename %s does not start with any of these prefixes: %s" % \
          (filename, prefixes)