[packages/python-virtualenv] - up to 1.7.2; really package bundled setuptools

arekm arekm at pld-linux.org
Wed Aug 29 17:40:14 CEST 2012


commit e17b322a8929d030addc72d1838788f80221e954
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Aug 29 17:40:10 2012 +0200

    - up to 1.7.2; really package bundled setuptools

 python-virtualenv.spec |  8 ++++----
 unpack-support.py      |  2 +-
 virtualenv-pld.patch   | 32 +++++++++++++++++++++-----------
 3 files changed, 26 insertions(+), 16 deletions(-)
---
diff --git a/python-virtualenv.spec b/python-virtualenv.spec
index 96901b9..8754ee4 100644
--- a/python-virtualenv.spec
+++ b/python-virtualenv.spec
@@ -1,11 +1,11 @@
 Summary:	Tool to create isolated Python environments
 Name:		python-virtualenv
-Version:	1.6.4
-Release:	3
+Version:	1.7.2
+Release:	1
 License:	MIT
 Group:		Development/Languages
 Source0:	http://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
-# Source0-md5:	1072b66d53c24e019a8f1304ac9d9fc5
+# Source0-md5:	b5d63b05373a4344ae099a68875aae78
 Source1:	https://raw.github.com/pypa/virtualenv/%{version}/bin/rebuild-script.py
 # Source1-md5:	b9748dcf1c81dc85a8368dcb7c680494
 Source2:	unpack-support.py
@@ -59,6 +59,6 @@ rm -rf $RPM_BUILD_ROOT
 %{py_sitescriptdir}/virtualenv-%{version}-py*.egg-info
 %{py_sitescriptdir}/virtualenv.py*
 %dir %{py_sitescriptdir}/virtualenv_support
-%{py_sitescriptdir}/virtualenv_support/__init__.py*
+%{py_sitescriptdir}/virtualenv_support/*.py*
 %{py_sitescriptdir}/virtualenv_support/*.gz
 %{py_sitescriptdir}/virtualenv_support/setuptools-*.egg
diff --git a/unpack-support.py b/unpack-support.py
index baca861..d357315 100644
--- a/unpack-support.py
+++ b/unpack-support.py
@@ -19,5 +19,5 @@ f.close()
 match = None
 for match in file_regex.finditer(content):
 	f = open(os.path.join('virtualenv_support', match.group(1)), 'wb')
-	f.write(eval("virtualenv." + match.group(2)))
+	f.write(eval("virtualenv." + match.group(2)).encode('utf-8'))
 	f.close()
diff --git a/virtualenv-pld.patch b/virtualenv-pld.patch
index f961b21..f236b3c 100644
--- a/virtualenv-pld.patch
+++ b/virtualenv-pld.patch
@@ -13,24 +13,24 @@ index c173dd4..e460b79 100644
 +                    'fcntl', 'cPickle', 'datetime', 'syslog', '_sqlite3', 'unicodedata']
  
  REQUIRED_FILES = ['lib-dynload', 'config']
- 
-@@ -944,7 +944,7 @@
+
+@@ -1089,7 +1089,7 @@
          inc_dir = join(home_dir, 'include')
          bin_dir = join(home_dir, 'bin')
-     else:
+     elif sys.platform != 'win32':
 -        lib_dir = join(home_dir, 'lib', py_version)
 +        lib_dir = join(home_dir, sys.lib, py_version)
          inc_dir = join(home_dir, 'include', py_version + abiflags)
          bin_dir = join(home_dir, 'bin')
      return home_dir, lib_dir, inc_dir, bin_dir
-@@ -1011,7 +1011,6 @@
+@@ -1167,7 +1167,6 @@
      else:
          prefix = sys.prefix
      mkdir(lib_dir)
 -    fix_lib64(lib_dir)
-     fix_local_scheme(home_dir)
      stdlib_dirs = [os.path.dirname(os.__file__)]
      if sys.platform == 'win32':
+         stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs'))
 @@ -1045,6 +1045,15 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear):
          site_filename = site_filename.replace('$py.class', '.py')
      site_filename_dst = change_prefix(site_filename, home_dir)
@@ -83,7 +83,13 @@ diff --git a/virtualenv_support/site.py b/virtualenv_support/site.py
 index 3f4585a..4c52afe 100644
 --- a/virtualenv_support/site.py
 +++ b/virtualenv_support/site.py
-@@ -230,29 +230,21 @@
+@@ -225,39 +225,25 @@
+                                 os.path.join(prefix, "Extras", "lib", "python")]
+ 
+                 else: # any other Python distros on OSX work this way
+-                    sitedirs = [os.path.join(prefix, "lib",
++                    sitedirs = [os.path.join(prefix, sys.lib,
+                                              "python" + sys.version[:3], "site-packages")]
  
              elif os.sep == '/':
                  sitedirs = [os.path.join(prefix,
@@ -93,7 +99,6 @@ index 3f4585a..4c52afe 100644
                                           "site-packages"),
 -                            os.path.join(prefix, "lib", "site-python"),
 +                            os.path.join(prefix, sys.lib, "site-python"),
-+                            os.path.join(prefix, sys.lib, "python" + sys.version[:3], "lib-dynload"),
                              os.path.join(prefix, "python" + sys.version[:3], "lib-dynload")]
 -                lib64_dir = os.path.join(prefix, "lib64", "python" + sys.version[:3], "site-packages")
 -                if (os.path.exists(lib64_dir) and 
@@ -106,16 +111,21 @@ index 3f4585a..4c52afe 100644
                  except AttributeError:
                      pass
 -                # Debian-specific dist-packages directories:
--                sitedirs.append(os.path.join(prefix, "lib",
--                                             "python" + sys.version[:3],
--                                             "dist-packages"))
+-                if sys.version[0] == '2':
+-                    sitedirs.append(os.path.join(prefix, "lib",
+-                                                 "python" + sys.version[:3],
+-                                                 "dist-packages"))
+-                else:
+-                    sitedirs.append(os.path.join(prefix, "lib",
+-                                                 "python" + sys.version[0],
+-                                                 "dist-packages"))
 -                sitedirs.append(os.path.join(prefix, "local/lib",
 -                                             "python" + sys.version[:3],
 -                                             "dist-packages"))
 -                sitedirs.append(os.path.join(prefix, "lib", "dist-python"))
 +                # PLD-specific dist-packages directories:
 +                sitedirs.append(os.path.join(prefix, "share",
-+                                             "python" + sys.version[:3]))
++                        "python" + sys.version[:3]))
              else:
                  sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
              if sys.platform == 'darwin':
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-virtualenv.git/commitdiff/e17b322a8929d030addc72d1838788f80221e954



More information about the pld-cvs-commit mailing list