[Python-modules-commits] r23006 - in packages/python-virtualenv/trunk/debian (10 files)
warsaw-guest at users.alioth.debian.org
warsaw-guest at users.alioth.debian.org
Thu Nov 15 00:57:09 UTC 2012
Date: Thursday, November 15, 2012 @ 00:57:06
Author: warsaw-guest
Revision: 23006
* New upstream release. Remaining changes:
+ debian/patches/{cleanup_tmpdirs,rebuild_script}.patch: Remove as
these have been applied upstream.
+ debian/patches/add_distribute.patch: Removed, since the new
implementation is much simpler.
+ debian/patches/add_setuptools_option.patch: Added, as the simpler
way to add the --setuptools option and $VIRTUALENV_SETUPTOOLS
environment variable. Submitted pull request upstream.
+ debian/patches/use_distribute.patch: Set the default to distribute.
Not forwarded upstream.
+ debian/pip-test_urlparse_uses_fragment.patch, debian/rules: Remove
the patching and repacking of pip-1.1 since the now embedded
pip-1.2.1 already contains the change.
Added:
packages/python-virtualenv/trunk/debian/patches/add_setuptools_option.patch
packages/python-virtualenv/trunk/debian/patches/use_distribute.patch
Modified:
packages/python-virtualenv/trunk/debian/changelog
packages/python-virtualenv/trunk/debian/patches/look_for_external_files.patch
packages/python-virtualenv/trunk/debian/patches/series
packages/python-virtualenv/trunk/debian/rules
Deleted:
packages/python-virtualenv/trunk/debian/patches/add_distribute.patch
packages/python-virtualenv/trunk/debian/patches/cleanup_tmpdirs.patch
packages/python-virtualenv/trunk/debian/patches/rebuild_script.patch
packages/python-virtualenv/trunk/debian/pip-test_urlparse_uses_fragment.patch
Modified: packages/python-virtualenv/trunk/debian/changelog
===================================================================
--- packages/python-virtualenv/trunk/debian/changelog 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/changelog 2012-11-15 00:57:06 UTC (rev 23006)
@@ -1,3 +1,21 @@
+python-virtualenv (1.8.2-1) UNRELEASED; urgency=low
+
+ * New upstream release. Remaining changes:
+ + debian/patches/{cleanup_tmpdirs,rebuild_script}.patch: Remove as
+ these have been applied upstream.
+ + debian/patches/add_distribute.patch: Removed, since the new
+ implementation is much simpler.
+ + debian/patches/add_setuptools_option.patch: Added, as the simpler
+ way to add the --setuptools option and $VIRTUALENV_SETUPTOOLS
+ environment variable. Submitted pull request upstream.
+ + debian/patches/use_distribute.patch: Set the default to distribute.
+ Not forwarded upstream.
+ + debian/pip-test_urlparse_uses_fragment.patch, debian/rules: Remove
+ the patching and repacking of pip-1.1 since the now embedded
+ pip-1.2.1 already contains the change.
+
+ -- Barry Warsaw <barry at python.org> Mon, 12 Nov 2012 17:27:47 -0500
+
python-virtualenv (1.7.1.2-2) unstable; urgency=low
* Apply test_urlparse_uses_fragment.patch to the bundled pip, allowing it to
Deleted: packages/python-virtualenv/trunk/debian/patches/add_distribute.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/add_distribute.patch 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/patches/add_distribute.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -1,55 +0,0 @@
-Description: Add --distribute as an option in virtualenv.py
- Enable --distribute by default in virtualenv.py but add --setuptools
- and $VIRTUALENV_USE_SETUPTOOLS to fallback to the default upstream
- behavior.
-Origin: vendor, http://patches.ubuntu.com/p/python-virtualenv/python-virtualenv_1.4.5-1ubuntu1.patch
-Author: Piotr Ożarowski <piotr at debian.org>, Carl Chenet <chaica at ohmytux.com>
-
---- a/virtualenv.py
-+++ b/virtualenv.py
-@@ -828,9 +828,16 @@
- parser.add_option(
- '--distribute',
- dest='use_distribute',
-- action='store_true',
-- help='Use Distribute instead of Setuptools. Set environ variable '
-- 'VIRTUALENV_DISTRIBUTE to make it the default ')
-+ action='store_true', default=True,
-+ help='Ignored. Distribute is used by default. See --setuptools '
-+ 'to use Setuptools instead of Distribute.')
-+
-+ parser.add_option(
-+ '--setuptools',
-+ dest='use_distribute',
-+ action='store_false',
-+ help='Use Setuptools instead of Distribute. Set environ variable '
-+ 'VIRTUALENV_SETUPTOOLS to make it the default.')
-
- default_search_dirs = file_search_dirs()
- parser.add_option(
-@@ -1012,7 +1019,7 @@
-
-
- def create_environment(home_dir, site_packages=False, clear=False,
-- unzip_setuptools=False, use_distribute=False,
-+ unzip_setuptools=False, use_distribute=True,
- prompt=None, search_dirs=None, never_download=False):
- """
- Creates a new environment in ``home_dir``.
-@@ -1033,11 +1040,13 @@
-
- # use_distribute also is True if VIRTUALENV_DISTRIBUTE env var is set
- # we also check VIRTUALENV_USE_DISTRIBUTE for backwards compatibility
-- if use_distribute or os.environ.get('VIRTUALENV_USE_DISTRIBUTE'):
-- install_distribute(py_executable, unzip=unzip_setuptools,
-+ if ((not use_distribute or os.environ.get('VIRTUALENV_USE_SETUPTOOLS')
-+ or os.environ.get('VIRTUALENV_SETUPTOOLS'))
-+ and not os.environ.get('VIRTUALENV_USE_DISTRIBUTE')):
-+ install_setuptools(py_executable, unzip=unzip_setuptools,
- search_dirs=search_dirs, never_download=never_download)
- else:
-- install_setuptools(py_executable, unzip=unzip_setuptools,
-+ install_distribute(py_executable, unzip=unzip_setuptools,
- search_dirs=search_dirs, never_download=never_download)
-
- install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
Added: packages/python-virtualenv/trunk/debian/patches/add_setuptools_option.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/add_setuptools_option.patch (rev 0)
+++ packages/python-virtualenv/trunk/debian/patches/add_setuptools_option.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -0,0 +1,28 @@
+Description: Add --setuptools as an explicit option in virtualenv.py.
+ This also allows the use of $VIRTUALENV_SETUPTOOLS environment variable to
+ select setuptools over distribute. This patch does not change the default
+ (see next patch in series for that).
+Origin: https://github.com/warsaw/virtualenv/compare/develop...setuptools
+Author: Barry Warsaw <barry at python.org>
+
+diff --git a/virtualenv.py b/virtualenv.py
+index 8fdb275..92f48b9 100755
+--- a/virtualenv.py
++++ b/virtualenv.py
+@@ -858,6 +858,16 @@ def main():
+ help='Use Distribute instead of Setuptools. Set environ variable '
+ 'VIRTUALENV_DISTRIBUTE to make it the default ')
+
++ parser.add_option(
++ '--setuptools',
++ dest='use_distribute',
++ action='store_false',
++ help='Use Setuptools instead of Distribute. Set environ variable '
++ 'VIRTUALENV_SETUPTOOLS to make it the default ')
++
++ # Set this to True to use distribute by default, even in Python 2.
++ parser.set_defaults(use_distribute=False)
++
+ default_search_dirs = file_search_dirs()
+ parser.add_option(
+ '--extra-search-dir',
Deleted: packages/python-virtualenv/trunk/debian/patches/cleanup_tmpdirs.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/cleanup_tmpdirs.patch 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/patches/cleanup_tmpdirs.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -1,43 +0,0 @@
-Description: Cleanup temporary directory created with mkdtemp()
-Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: https://github.com/pypa/virtualenv/pull/231
-Bug-Debian: http://bugs.debian.org/661272
-Date: Sat Feb 25 22:07:41 2012 +0200
-
---- a/virtualenv.py
-+++ b/virtualenv.py
-@@ -568,6 +568,8 @@
- finally:
- logger.indent -= 2
- logger.end_progress()
-+ if cwd is not None:
-+ shutil.rmtree(cwd)
- if os.getcwd() != old_chdir:
- os.chdir(old_chdir)
- if is_jython and os._name == 'nt':
---- a/virtualenv_embedded/distribute_setup.py
-+++ b/virtualenv_embedded/distribute_setup.py
-@@ -14,6 +14,7 @@
- This file can also be run as a script to install or upgrade setuptools.
- """
- import os
-+import shutil
- import sys
- import time
- import fnmatch
-@@ -86,6 +87,7 @@
- log.warn('See the error message above.')
- finally:
- os.chdir(old_wd)
-+ shutil.rmtree(tmpdir)
-
-
- def _build_egg(egg, tarball, to_dir):
-@@ -110,6 +112,7 @@
-
- finally:
- os.chdir(old_wd)
-+ shutil.rmtree(tmpdir)
- # returning the result
- log.warn(egg)
- if not os.path.exists(egg):
Modified: packages/python-virtualenv/trunk/debian/patches/look_for_external_files.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/look_for_external_files.patch 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/patches/look_for_external_files.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -3,7 +3,7 @@
--- a/virtualenv.py
+++ b/virtualenv.py
-@@ -576,7 +576,8 @@
+@@ -582,7 +582,8 @@
def file_search_dirs():
here = os.path.dirname(os.path.abspath(__file__))
dirs = ['.', here,
@@ -15,14 +15,12 @@
try:
--- a/setup.py
+++ b/setup.py
-@@ -50,8 +50,8 @@
- url='http://www.virtualenv.org',
- license='MIT',
- py_modules=['virtualenv'],
-- packages=['virtualenv_support'],
-- package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
-+ #packages=['virtualenv_support'],
-+ #package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
- test_suite='nose.collector',
- tests_require=['nose', 'Mock'],
- **kw
+@@ -86,6 +86,6 @@
+ url='http://www.virtualenv.org',
+ license='MIT',
+ py_modules=['virtualenv'],
+- packages=['virtualenv_support'],
+- package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
++ #packages=['virtualenv_support'],
++ #package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3], '*.tar.gz']},
+ **setup_params)
Deleted: packages/python-virtualenv/trunk/debian/patches/rebuild_script.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/rebuild_script.patch 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/patches/rebuild_script.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -1,79 +0,0 @@
-Description: Include the tool to rebuild the embedded parts of virtualenv.py
- It's part of the upstream git repository, but was left out of the tarball.
-Author: Stefano Rivera <stefanor at debian.org>
-Forwarded: https://github.com/pypa/virtualenv/pull/256
-
---- /dev/null
-+++ b/bin/rebuild-script.py
-@@ -0,0 +1,71 @@
-+#!/usr/bin/env python
-+"""
-+Helper script to rebuild virtualenv.py from virtualenv_support
-+"""
-+
-+import re
-+import os
-+import sys
-+
-+here = os.path.dirname(__file__)
-+script = os.path.join(here, '..', 'virtualenv.py')
-+
-+file_regex = re.compile(
-+ r'##file (.*?)\n([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*convert\("""(.*?)"""\)',
-+ re.S)
-+file_template = '##file %(filename)s\n%(varname)s = convert("""\n%(data)s""")'
-+
-+def rebuild():
-+ f = open(script, 'rb')
-+ content = f.read()
-+ f.close()
-+ parts = []
-+ last_pos = 0
-+ match = None
-+ for match in file_regex.finditer(content):
-+ parts.append(content[last_pos:match.start()])
-+ last_pos = match.end()
-+ filename = match.group(1)
-+ varname = match.group(2)
-+ data = match.group(3)
-+ print('Found reference to file %s' % filename)
-+ pathname = os.path.join(here, '..', 'virtualenv_embedded', filename)
-+ f = open(pathname, 'rb')
-+ c = f.read()
-+ f.close()
-+ new_data = c.encode('zlib').encode('base64')
-+ if new_data == data:
-+ print(' Reference up to date (%s bytes)' % len(c))
-+ parts.append(match.group(0))
-+ continue
-+ print(' Content changed (%s bytes -> %s bytes)' % (
-+ zipped_len(data), len(c)))
-+ new_match = file_template % dict(
-+ filename=filename,
-+ varname=varname,
-+ data=new_data)
-+ parts.append(new_match)
-+ parts.append(content[last_pos:])
-+ new_content = ''.join(parts)
-+ if new_content != content:
-+ sys.stdout.write('Content updated; overwriting... ')
-+ f = open(script, 'wb')
-+ f.write(new_content)
-+ f.close()
-+ print('done.')
-+ else:
-+ print('No changes in content')
-+ if match is None:
-+ print('No variables were matched/found')
-+
-+def zipped_len(data):
-+ if not data:
-+ return 'no data'
-+ try:
-+ return len(data.decode('base64').decode('zlib'))
-+ except:
-+ return 'unknown'
-+
-+if __name__ == '__main__':
-+ rebuild()
-+
Modified: packages/python-virtualenv/trunk/debian/patches/series
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/series 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/patches/series 2012-11-15 00:57:06 UTC (rev 23006)
@@ -1,5 +1,4 @@
look_for_external_files.patch
-add_distribute.patch
-cleanup_tmpdirs.patch
-rebuild_script.patch
+add_setuptools_option.patch
+use_distribute.patch
system-python.patch
Added: packages/python-virtualenv/trunk/debian/patches/use_distribute.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/patches/use_distribute.patch (rev 0)
+++ packages/python-virtualenv/trunk/debian/patches/use_distribute.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -0,0 +1,15 @@
+Description: Use distribute by default.
+Author: Barry Warsaw <barry at python.org>
+Forwarded: no
+
+--- a/virtualenv.py
++++ b/virtualenv.py
+@@ -858,7 +858,7 @@
+ 'VIRTUALENV_SETUPTOOLS to make it the default ')
+
+ # Set this to True to use distribute by default, even in Python 2.
+- parser.set_defaults(use_distribute=False)
++ parser.set_defaults(use_distribute=True)
+
+ default_search_dirs = file_search_dirs()
+ parser.add_option(
Deleted: packages/python-virtualenv/trunk/debian/pip-test_urlparse_uses_fragment.patch
===================================================================
--- packages/python-virtualenv/trunk/debian/pip-test_urlparse_uses_fragment.patch 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/pip-test_urlparse_uses_fragment.patch 2012-11-15 00:57:06 UTC (rev 23006)
@@ -1,36 +0,0 @@
-Description: fix the improper use of urllib.parse.uses_fragment
-Since Python >= 2.7.3, 3.2.3 the module urlparse/urllib.parse (python3) do not
-have a uses_fragment attribute. This patch tests if it exists before using it.
-Origin: upstream
-Bug: https://github.com/pypa/pip/issues/552
-Bug-Debian: http://bugs.debian.org/677801
-Last-Update: 2012-06-19
-
---- python-pip-1.1.orig/pip/vcs/__init__.py
-+++ python-pip-1.1/pip/vcs/__init__.py
-@@ -19,7 +19,9 @@ class VcsSupport(object):
- def __init__(self):
- # Register more schemes with urlparse for various version control systems
- urlparse.uses_netloc.extend(self.schemes)
-- urlparse.uses_fragment.extend(self.schemes)
-+ # Python >= 2.7.4, 3.3 doesn't have uses_fragment
-+ if getattr(urlparse, 'uses_fragment', None):
-+ urlparse.uses_fragment.extend(self.schemes)
- super(VcsSupport, self).__init__()
-
- def __iter__(self):
---- python-pip-1.1.orig/pip/vcs/bazaar.py
-+++ python-pip-1.1/pip/vcs/bazaar.py
-@@ -20,8 +20,10 @@ class Bazaar(VersionControl):
-
- def __init__(self, url=None, *args, **kwargs):
- super(Bazaar, self).__init__(url, *args, **kwargs)
-- urlparse.non_hierarchical.extend(['lp'])
-- urlparse.uses_fragment.extend(['lp'])
-+ # Python >= 2.7.4, 3.3 doesn't have uses_fragment or non_hierarchical
-+ if getattr(urlparse, 'uses_fragment', None):
-+ urlparse.uses_fragment.extend(self.schemes)
-+ urlparse.non_hierarchical.extend(['lp'])
-
- def parse_vcs_bundle_file(self, content):
- url = rev = None
Modified: packages/python-virtualenv/trunk/debian/rules
===================================================================
--- packages/python-virtualenv/trunk/debian/rules 2012-11-14 09:11:55 UTC (rev 23005)
+++ packages/python-virtualenv/trunk/debian/rules 2012-11-15 00:57:06 UTC (rev 23006)
@@ -4,12 +4,6 @@
dh $@ --with python2
override_dh_auto_configure:
- rm -f virtualenv_support/pip-1.1.debian1.tar.gz
- # Patch pip 1.1
- tar -xf virtualenv_support/pip-1.1.tar.gz
- cd pip-1.1 && patch -p1 < ../debian/pip-test_urlparse_uses_fragment.patch
- GZIP=--best tar --owner root --group root -cz \
- -f virtualenv_support/pip-1.1.debian1.tar.gz pip-1.1
# Rebuild the embedded parts, we may be quilt patching their sources
[ -e virtualenv.py.orig ] || cp virtualenv.py virtualenv.py.orig
python bin/rebuild-script.py
@@ -17,12 +11,7 @@
override_dh_auto_clean:
[ ! -e virtualenv.py.orig ] || mv virtualenv.py.orig virtualenv.py
- rm -rf pip-1.1 virtualenv_support/pip-1.1.debian1.tar.gz
dh_auto_clean
override_dh_installchangelogs:
dh_installchangelogs docs/news.txt
-
-override_dh_install:
- dh_install
- rm debian/python-virtualenv/usr/share/python-virtualenv/pip-1.1.tar.gz
More information about the Python-modules-commits
mailing list