Hello community, here is the log from the commit of package python-distribute for openSUSE:Factory checked in at Tue May 31 16:40:15 CEST 2011.
-------- --- python-distribute/python-distribute.changes 2010-08-31 01:48:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/python-distribute/python-distribute.changes 2011-05-30 23:08:41.000000000 +0200 @@ -1,0 +2,36 @@ +Mon May 30 21:07:25 UTC 2011 - [email protected] + +- Update to 0.6.17: + * Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment + variable to allow to disable installation of easy_install-${version} script. + * Support Python >=3.1.4 and >=3.2.1. + * Issue 204: Don't try to import the parent of a namespace package in + declare_namespace + * Issue 196: Tolerate responses with multiple Content-Length headers + * Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires + problems. + +------------------------------------------------------------------- +Sat Apr 30 17:18:30 UTC 2011 - [email protected] + +- Update to 0.6.16: + * Builds sdist gztar even on Windows (avoiding Issue 193). + * Issue 192: Fixed metadata omitted on Windows when package_dir + specified with forward-slash. + * Issue 195: Cython build support. + * Issue 200: Issues with recognizing 64-bit packages on Windows. + Aditional changes from 0.6.15: + * Fixed typo in bdist_egg + * Several issues under Python 3 has been solved. + * Issue 146: Fixed missing DLL files after easy_install of windows + exe package. + +------------------------------------------------------------------- +Tue Apr 26 20:33:38 UTC 2011 - [email protected] + +- Spec file cleanup: + - Removed authors from description + - Obsoletes/Provides setuptools version fixed + - %py_requires available only on SUSE distros + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- distribute-0.6.14.tar.bz2 New: ---- distribute-0.6.17.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-distribute.spec ++++++ --- /var/tmp/diff_new_pack.ieOq2e/_old 2011-05-31 16:39:31.000000000 +0200 +++ /var/tmp/diff_new_pack.ieOq2e/_new 2011-05-31 16:39:31.000000000 +0200 @@ -16,27 +16,29 @@ # +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")} + %define modname distribute Name: python-%{modname} -Version: 0.6.14 +Version: 0.6.17 Release: 1 -License: PSF or ZPL -Summary: Easily Download, Build, Install, Upgrade, and Uninstall Python Packages Url: http://packages.python.org/distribute/ +Summary: Easily Download, Build, Install, Upgrade, and Uninstall Python Packages +License: PSF or ZPL Group: Development/Libraries/Python Source: %{modname}-%{version}.tar.bz2 -BuildRequires: python-devel BuildRoot: %{_tmppath}/%{name}-%{version}-build -Obsoletes: python-setuptools -Provides: python-setuptools -%{py_requires} -%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1} +BuildRequires: python-devel +%if 0%{?suse_version} +%py_requires +%if 0%{?suse_version} > 1110 BuildArch: noarch -%else -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(True)")} %endif +%endif +Obsoletes: python-setuptools < %{version} +Provides: python-setuptools = %{version} %description Distribute is a fork of the Setuptools project. @@ -44,10 +46,6 @@ Distribute is intended to replace Setuptools as the standard method for working with Python module distributions. -Author: --------- - The fellowship of the packaging <[email protected]> - %prep %setup -q -n %{modname}-%{version} rm -f distribute.egg-info/*.orig ++++++ distribute-0.6.14.tar.bz2 -> distribute-0.6.17.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/CHANGES.txt new/distribute-0.6.17/CHANGES.txt --- old/distribute-0.6.14/CHANGES.txt 2010-07-15 02:03:02.000000000 +0200 +++ new/distribute-0.6.17/CHANGES.txt 2011-05-30 17:55:22.000000000 +0200 @@ -3,6 +3,37 @@ ======= ------ +0.6.17 +------ + +* Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment + variable to allow to disable installation of easy_install-${version} script. +* Support Python >=3.1.4 and >=3.2.1. +* Issue 204: Don't try to import the parent of a namespace package in + declare_namespace +* Issue 196: Tolerate responses with multiple Content-Length headers +* Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires + problems. + +------ +0.6.16 +------ + +* Builds sdist gztar even on Windows (avoiding Issue 193). +* Issue 192: Fixed metadata omitted on Windows when package_dir + specified with forward-slash. +* Issue 195: Cython build support. +* Issue 200: Issues with recognizing 64-bit packages on Windows. + +------ +0.6.15 +------ + +* Fixed typo in bdist_egg +* Several issues under Python 3 has been solved. +* Issue 146: Fixed missing DLL files after easy_install of windows exe package. + +------ 0.6.14 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/CONTRIBUTORS.txt new/distribute-0.6.17/CONTRIBUTORS.txt --- old/distribute-0.6.14/CONTRIBUTORS.txt 2010-07-15 01:53:37.000000000 +0200 +++ new/distribute-0.6.17/CONTRIBUTORS.txt 2011-05-16 14:05:34.000000000 +0200 @@ -14,6 +14,7 @@ * Noufal Ibrahim * Philip Jenvey * Reinout van Rees +* Robert Myers * Tarek Ziadé * Toshio Kuratomi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/PKG-INFO new/distribute-0.6.17/PKG-INFO --- old/distribute-0.6.14/PKG-INFO 2010-07-15 02:14:11.000000000 +0200 +++ new/distribute-0.6.17/PKG-INFO 2011-05-30 17:58:23.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: distribute -Version: 0.6.14 +Version: 0.6.17 Summary: Easily download, build, install, upgrade, and uninstall Python packages Home-page: http://packages.python.org/distribute Author: The fellowship of the packaging @@ -107,9 +107,9 @@ Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz - $ tar -xzvf distribute-0.6.14.tar.gz - $ cd distribute-0.6.14 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.17.tar.gz + $ tar -xzvf distribute-0.6.17.tar.gz + $ cd distribute-0.6.17 $ python setup.py install --------------------------- @@ -239,6 +239,37 @@ ======= ------ + 0.6.17 + ------ + + * Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment + variable to allow to disable installation of easy_install-${version} script. + * Support Python >=3.1.4 and >=3.2.1. + * Issue 204: Don't try to import the parent of a namespace package in + declare_namespace + * Issue 196: Tolerate responses with multiple Content-Length headers + * Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires + problems. + + ------ + 0.6.16 + ------ + + * Builds sdist gztar even on Windows (avoiding Issue 193). + * Issue 192: Fixed metadata omitted on Windows when package_dir + specified with forward-slash. + * Issue 195: Cython build support. + * Issue 200: Issues with recognizing 64-bit packages on Windows. + + ------ + 0.6.15 + ------ + + * Fixed typo in bdist_egg + * Several issues under Python 3 has been solved. + * Issue 146: Fixed missing DLL files after easy_install of windows exe package. + + ------ 0.6.14 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/README.txt new/distribute-0.6.17/README.txt --- old/distribute-0.6.14/README.txt 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/README.txt 2011-05-30 17:57:03.000000000 +0200 @@ -99,9 +99,9 @@ Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz - $ tar -xzvf distribute-0.6.14.tar.gz - $ cd distribute-0.6.14 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.17.tar.gz + $ tar -xzvf distribute-0.6.17.tar.gz + $ cd distribute-0.6.17 $ python setup.py install --------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/distribute.egg-info/PKG-INFO new/distribute-0.6.17/distribute.egg-info/PKG-INFO --- old/distribute-0.6.14/distribute.egg-info/PKG-INFO 2010-07-15 02:14:10.000000000 +0200 +++ new/distribute-0.6.17/distribute.egg-info/PKG-INFO 2011-05-30 17:58:22.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: distribute -Version: 0.6.14 +Version: 0.6.17 Summary: Easily download, build, install, upgrade, and uninstall Python packages Home-page: http://packages.python.org/distribute Author: The fellowship of the packaging @@ -107,9 +107,9 @@ Download the source tarball, uncompress it, then run the install command:: - $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz - $ tar -xzvf distribute-0.6.14.tar.gz - $ cd distribute-0.6.14 + $ curl -O http://pypi.python.org/packages/source/d/distribute/distribute-0.6.17.tar.gz + $ tar -xzvf distribute-0.6.17.tar.gz + $ cd distribute-0.6.17 $ python setup.py install --------------------------- @@ -239,6 +239,37 @@ ======= ------ + 0.6.17 + ------ + + * Support 'DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT' environment + variable to allow to disable installation of easy_install-${version} script. + * Support Python >=3.1.4 and >=3.2.1. + * Issue 204: Don't try to import the parent of a namespace package in + declare_namespace + * Issue 196: Tolerate responses with multiple Content-Length headers + * Issue 205: Sandboxing doesn't preserve working_set. Leads to setup_requires + problems. + + ------ + 0.6.16 + ------ + + * Builds sdist gztar even on Windows (avoiding Issue 193). + * Issue 192: Fixed metadata omitted on Windows when package_dir + specified with forward-slash. + * Issue 195: Cython build support. + * Issue 200: Issues with recognizing 64-bit packages on Windows. + + ------ + 0.6.15 + ------ + + * Fixed typo in bdist_egg + * Several issues under Python 3 has been solved. + * Issue 146: Fixed missing DLL files after easy_install of windows exe package. + + ------ 0.6.14 ------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/distribute.egg-info/SOURCES.txt new/distribute-0.6.17/distribute.egg-info/SOURCES.txt --- old/distribute-0.6.14/distribute.egg-info/SOURCES.txt 2010-07-15 02:14:11.000000000 +0200 +++ new/distribute-0.6.17/distribute.egg-info/SOURCES.txt 2011-05-30 17:58:23.000000000 +0200 @@ -14,6 +14,7 @@ distribute.egg-info/SOURCES.txt distribute.egg-info/dependency_links.txt distribute.egg-info/entry_points.txt +distribute.egg-info/entry_points.txt.orig distribute.egg-info/top_level.txt distribute.egg-info/zip-safe docs/Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/distribute.egg-info/entry_points.txt.orig new/distribute-0.6.17/distribute.egg-info/entry_points.txt.orig --- old/distribute-0.6.14/distribute.egg-info/entry_points.txt.orig 1970-01-01 01:00:00.000000000 +0100 +++ new/distribute-0.6.17/distribute.egg-info/entry_points.txt.orig 2011-05-26 12:12:27.000000000 +0200 @@ -0,0 +1,61 @@ +[distutils.commands] +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +rotate = setuptools.command.rotate:rotate +develop = setuptools.command.develop:develop +setopt = setuptools.command.setopt:setopt +build_py = setuptools.command.build_py:build_py +saveopts = setuptools.command.saveopts:saveopts +egg_info = setuptools.command.egg_info:egg_info +register = setuptools.command.register:register +upload_docs = setuptools.command.upload_docs:upload_docs +install_egg_info = setuptools.command.install_egg_info:install_egg_info +alias = setuptools.command.alias:alias +easy_install = setuptools.command.easy_install:easy_install +install_scripts = setuptools.command.install_scripts:install_scripts +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +bdist_egg = setuptools.command.bdist_egg:bdist_egg +install = setuptools.command.install:install +test = setuptools.command.test:test +install_lib = setuptools.command.install_lib:install_lib +build_ext = setuptools.command.build_ext:build_ext +sdist = setuptools.command.sdist:sdist + +[egg_info.writers] +dependency_links.txt = setuptools.command.egg_info:overwrite_arg +requires.txt = setuptools.command.egg_info:write_requirements +PKG-INFO = setuptools.command.egg_info:write_pkg_info +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +top_level.txt = setuptools.command.egg_info:write_toplevel_names +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +depends.txt = setuptools.command.egg_info:warn_depends_obsolete + +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-2.6 = setuptools.command.easy_install:main + +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[distutils.setup_keywords] +dependency_links = setuptools.dist:assert_string_list +entry_points = setuptools.dist:check_entry_points +extras_require = setuptools.dist:check_extras +package_data = setuptools.dist:check_package_data +install_requires = setuptools.dist:check_requirements +use_2to3 = setuptools.dist:assert_bool +use_2to3_fixers = setuptools.dist:assert_string_list +include_package_data = setuptools.dist:assert_bool +exclude_package_data = setuptools.dist:check_package_data +namespace_packages = setuptools.dist:check_nsp +test_suite = setuptools.dist:check_test_suite +eager_resources = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool +test_loader = setuptools.dist:check_importable +packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +tests_require = setuptools.dist:check_requirements + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/distribute_setup.py new/distribute-0.6.17/distribute_setup.py --- old/distribute-0.6.14/distribute_setup.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/distribute_setup.py 2011-05-16 14:05:34.000000000 +0200 @@ -46,7 +46,7 @@ args = [quote(arg) for arg in args] return os.spawnl(os.P_WAIT, sys.executable, *args) == 0 -DEFAULT_VERSION = "0.6.13" +DEFAULT_VERSION = "0.6.17" DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/" SETUPTOOLS_FAKED_VERSION = "0.6c11" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/docs/conf.py new/distribute-0.6.17/docs/conf.py --- old/distribute-0.6.14/docs/conf.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/docs/conf.py 2011-05-16 14:05:34.000000000 +0200 @@ -41,16 +41,16 @@ # General information about the project. project = u'Distribute' -copyright = u'2009, The fellowship of the packaging' +copyright = u'2009-2011, The fellowship of the packaging' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = '0.6.14' +version = '0.6.17' # The full version, including alpha/beta/rc tags. -release = '0.6.14' +release = '0.6.17' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/docs/index.txt new/distribute-0.6.17/docs/index.txt --- old/distribute-0.6.14/docs/index.txt 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/docs/index.txt 2011-05-30 17:55:12.000000000 +0200 @@ -28,3 +28,9 @@ .. image:: http://python-distribute.org/pip_distribute.png Design done by Idan Gazit (http://pixane.com) - License: cc-by-3.0 + +Copy & paste:: + + curl -O http://python-distribute.org/distribute_setup.py + python distribute_setup.py + easy_install pip \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/docs/setuptools.txt new/distribute-0.6.17/docs/setuptools.txt --- old/distribute-0.6.14/docs/setuptools.txt 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/docs/setuptools.txt 2011-05-20 09:48:10.000000000 +0200 @@ -2519,7 +2519,7 @@ Your function should accept three arguments: the ``Distribution`` object, the attribute name, and the attribute value. It should raise a -``DistutilsSetupError`` (from the ``distutils.error`` module) if the argument +``DistutilsSetupError`` (from the ``distutils.errors`` module) if the argument is invalid. Remember, your function will only be called with non-None values, and the default value of arguments defined this way is always None. So, your commands should always be prepared for the possibility that the attribute will diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/pkg_resources.py new/distribute-0.6.17/pkg_resources.py --- old/distribute-0.6.14/pkg_resources.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/pkg_resources.py 2011-05-26 12:13:22.000000000 +0200 @@ -52,9 +52,41 @@ mkdir(dirname, mode) +_state_vars = {} +def _declare_state(vartype, **kw): + g = globals() + for name, val in kw.iteritems(): + g[name] = val + _state_vars[name] = vartype + +def __getstate__(): + state = {} + g = globals() + for k, v in _state_vars.iteritems(): + state[k] = g['_sget_'+v](g[k]) + return state + +def __setstate__(state): + g = globals() + for k, v in state.iteritems(): + g['_sset_'+_state_vars[k]](k, g[k], v) + return state +def _sget_dict(val): + return val.copy() +def _sset_dict(key, ob, state): + ob.clear() + ob.update(state) + +def _sget_object(val): + return val.__getstate__() + +def _sset_object(key, ob, state): + ob.__setstate__(state) + +_sget_none = _sset_none = lambda *args: None @@ -672,12 +704,15 @@ for callback in self.callbacks: callback(dist) - - - - - - + def __getstate__(self): + return (self.entries[:], self.entry_keys.copy(), self.by_key.copy(), + self.callbacks[:]) + + def __setstate__(self, (entries, keys, by_key, callbacks)): + self.entries = entries[:] + self.entry_keys = keys.copy() + self.by_key = by_key.copy() + self.callbacks = callbacks[:] @@ -1638,7 +1673,7 @@ -_distribution_finders = {} +_declare_state('dict', _distribution_finders = {}) def register_finder(importer_type, distribution_finder): """Register `distribution_finder` to find distributions in sys.path items @@ -1720,8 +1755,9 @@ break register_finder(ImpWrapper,find_on_path) -_namespace_handlers = {} -_namespace_packages = {} +_declare_state('dict', _namespace_handlers={}) +_declare_state('dict', _namespace_packages={}) + def register_namespace_handler(importer_type, namespace_handler): """Register `namespace_handler` to declare namespace packages @@ -1773,11 +1809,12 @@ if '.' in packageName: parent = '.'.join(packageName.split('.')[:-1]) declare_namespace(parent) - __import__(parent) - try: - path = sys.modules[parent].__path__ - except AttributeError: - raise TypeError("Not a package:", parent) + if parent not in _namespace_packages: + __import__(parent) + try: + path = sys.modules[parent].__path__ + except AttributeError: + raise TypeError("Not a package:", parent) # Track what packages are namespaces, so when new path items are added, # they can be updated @@ -2650,7 +2687,7 @@ os.open = old_open # and then put it back -# Set up global resource manager +# Set up global resource manager (deliberately not state-saved) _manager = ResourceManager() def _initialize(g): for name in dir(_manager): @@ -2659,7 +2696,8 @@ _initialize(globals()) # Prepare the master working set and make the ``require()`` API available -working_set = WorkingSet() +_declare_state('object', working_set = WorkingSet()) + try: # Does the main program list any requirements? from __main__ import __requires__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setup.cfg new/distribute-0.6.17/setup.cfg --- old/distribute-0.6.14/setup.cfg 2010-07-15 02:14:11.000000000 +0200 +++ new/distribute-0.6.17/setup.cfg 2011-05-30 17:58:23.000000000 +0200 @@ -11,6 +11,9 @@ [upload_docs] upload-dir = docs/build/html +[sdist] +formats = gztar + [aliases] release = egg_info -RDb '' binary = bdist_egg upload --show-response diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setup.py new/distribute-0.6.17/setup.py --- old/distribute-0.6.14/setup.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setup.py 2011-05-30 17:57:09.000000000 +0200 @@ -37,7 +37,7 @@ exec(open(init_path).read(), d) SETUP_COMMANDS = d['__all__'] -VERSION = "0.6.14" +VERSION = "0.6.17" from setuptools import setup, find_packages from setuptools.command.build_py import build_py as _build_py @@ -45,6 +45,10 @@ scripts = [] +console_scripts = ["easy_install = setuptools.command.easy_install:main"] +if os.environ.get("DISTRIBUTE_DISABLE_VERSIONED_EASY_INSTALL_SCRIPT") is None: + console_scripts.append("easy_install-%s = setuptools.command.easy_install:main" % sys.version[:3]) + # specific command that is used to generate windows .exe files class build_py(_build_py): def build_package_data(self): @@ -182,11 +186,7 @@ "dependency_links.txt = setuptools.command.egg_info:overwrite_arg", ], - "console_scripts": [ - "easy_install = setuptools.command.easy_install:main", - "easy_install-%s = setuptools.command.easy_install:main" - % sys.version[:3] - ], + "console_scripts": console_scripts, "setuptools.file_finders": ["svn_cvs = setuptools.command.sdist:_default_revctrl"], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/command/bdist_egg.py new/distribute-0.6.17/setuptools/command/bdist_egg.py --- old/distribute-0.6.14/setuptools/command/bdist_egg.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/command/bdist_egg.py 2011-05-16 14:05:34.000000000 +0200 @@ -332,7 +332,11 @@ def copy_metadata_to(self, target_dir): - prefix = os.path.join(self.egg_info,'') + "Copy metadata (egg info) to the target_dir" + # normalize the path (so that a forward-slash in egg_info will + # match using startswith below) + norm_egg_info = os.path.normpath(self.egg_info) + prefix = os.path.join(norm_egg_info,'') for path in self.ei_cmd.filelist.files: if path.startswith(prefix): target = os.path.join(target_dir, path[len(prefix):]) @@ -535,6 +539,6 @@ z.close() else: for dirname, dirs, files in os.walk(base_dir): - visit(None, dirname, file) + visit(None, dirname, files) return zip_filename # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/command/easy_install.py new/distribute-0.6.17/setuptools/command/easy_install.py --- old/distribute-0.6.14/setuptools/command/easy_install.py 2010-07-15 01:59:21.000000000 +0200 +++ new/distribute-0.6.17/setuptools/command/easy_install.py 2011-05-16 14:05:34.000000000 +0200 @@ -15,6 +15,7 @@ from setuptools import Command, _dont_write_bytecode from setuptools.sandbox import run_setup from distutils import log, dir_util +from distutils.util import get_platform from distutils.util import convert_path, subst_vars from distutils.sysconfig import get_python_lib, get_config_vars from distutils.errors import DistutilsArgError, DistutilsOptionError, \ @@ -202,6 +203,8 @@ 'prefix': prefix, 'sys_exec_prefix': exec_prefix, 'exec_prefix': exec_prefix, + # Only python 3.2+ has abiflags + 'abiflags': getattr(sys, 'abiflags', ''), } if HAS_USER_SITE: @@ -377,7 +380,7 @@ def check_site_dir(self): """Verify that self.install_dir is .pth-capable dir, if needed""" - print 'install_dir', self.install_dir + instdir = normalize_path(self.install_dir) pth_file = os.path.join(instdir,'easy-install.pth') @@ -852,7 +855,7 @@ # Create a dummy distribution object until we build the real distro dist = Distribution(None, project_name=cfg.get('metadata','name'), - version=cfg.get('metadata','version'), platform="win32" + version=cfg.get('metadata','version'), platform=get_platform() ) # Convert the .exe to an unpacked egg @@ -1445,7 +1448,8 @@ prefixes = [ ('PURELIB/', ''), ('PLATLIB/pywin32_system32', ''), ('PLATLIB/', ''), - ('SCRIPTS/', 'EGG-INFO/scripts/') + ('SCRIPTS/', 'EGG-INFO/scripts/'), + ('DATA/LIB/site-packages', ''), ] z = zipfile.ZipFile(exe_filename) try: @@ -1586,6 +1590,11 @@ def get_script_header(script_text, executable=sys_executable, wininst=False): """Create a #! line, getting options (if any) from script_text""" from distutils.command.build_scripts import first_line_re + + # first_line_re in Python >=3.1.4 and >=3.2.1 is a bytes pattern. + if not isinstance(first_line_re.pattern, str): + first_line_re = re.compile(first_line_re.pattern.decode()) + first = (script_text+'\n').splitlines()[0] match = first_line_re.match(first) options = '' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/dist.py new/distribute-0.6.17/setuptools/dist.py --- old/distribute-0.6.14/setuptools/dist.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/dist.py 2011-05-26 12:13:22.000000000 +0200 @@ -266,6 +266,7 @@ """Fetch an egg needed for building""" try: cmd = self._egg_fetcher + cmd.package_index.to_scan = [] except AttributeError: from setuptools.command.easy_install import easy_install dist = self.__class__({'script_args':['easy_install']}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/extension.py new/distribute-0.6.17/setuptools/extension.py --- old/distribute-0.6.14/setuptools/extension.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/extension.py 2011-05-16 14:05:34.000000000 +0200 @@ -2,12 +2,16 @@ from setuptools.dist import _get_unpatched _Extension = _get_unpatched(_Extension) -try: - from Pyrex.Distutils.build_ext import build_ext -except ImportError: - have_pyrex = False -else: - have_pyrex = True +# Prefer Cython to Pyrex +pyrex_impls = 'Cython.Distutils.build_ext', 'Pyrex.Distutils.build_ext' +for pyrex_impl in pyrex_impls: + try: + # from (pyrex_impl) import build_ext + build_ext = __import__(pyrex_impl, fromlist=['build_ext']).build_ext + break + except: + pass +have_pyrex = 'build_ext' in globals() class Extension(_Extension): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/package_index.py new/distribute-0.6.17/setuptools/package_index.py --- old/distribute-0.6.14/setuptools/package_index.py 2010-07-15 01:56:32.000000000 +0200 +++ new/distribute-0.6.17/setuptools/package_index.py 2011-05-16 14:21:31.000000000 +0200 @@ -1,5 +1,5 @@ """PyPI and direct package downloading""" -import sys, os.path, re, urlparse, urllib2, shutil, random, socket, cStringIO +import sys, os.path, re, urlparse, urllib, urllib2, shutil, random, socket, cStringIO import httplib from pkg_resources import * from distutils import log @@ -31,16 +31,25 @@ """Return (base,pyversion) or (None,None) for possible .exe name""" lower = name.lower() - base, py_ver = None, None + base, py_ver, plat = None, None, None if lower.endswith('.exe'): if lower.endswith('.win32.exe'): base = name[:-10] + plat = 'win32' elif lower.startswith('.win32-py',-16): py_ver = name[-7:-4] base = name[:-16] + plat = 'win32' + elif lower.endswith('.win-amd64.exe'): + base = name[:-14] + plat = 'win-amd64' + elif lower.startswith('.win-amd64-py',-20): + py_ver = name[-7:-4] + base = name[:-20] + plat = 'win-amd64' + return base,py_ver,plat - return base,py_ver def egg_info_for_url(url): scheme, server, path, parameters, query, fragment = urlparse.urlparse(url) @@ -69,10 +78,10 @@ return [Distribution.from_location(location, basename, metadata)] if basename.endswith('.exe'): - win_base, py_ver = parse_bdist_wininst(basename) + win_base, py_ver, platform = parse_bdist_wininst(basename) if win_base is not None: return interpret_distro_name( - location, win_base, metadata, py_ver, BINARY_DIST, "win32" + location, win_base, metadata, py_ver, BINARY_DIST, platform ) # Try source distro extensions (.zip, .tgz, etc.) @@ -199,8 +208,12 @@ base = f.url # handle redirects page = f.read() - if sys.version_info >= (3,): - charset = f.headers.get_param('charset') or 'latin-1' + if not isinstance(page, str): # We are in Python 3 and got bytes. We want str. + if isinstance(f, urllib2.HTTPError): + # Errors have no charset, assume latin1: + charset = 'latin-1' + else: + charset = f.headers.get_param('charset') or 'latin-1' page = page.decode(charset, "ignore") f.close() for match in HREF.finditer(page): @@ -566,7 +579,9 @@ bs = self.dl_blocksize size = -1 if "content-length" in headers: - size = int(headers["Content-Length"]) + # Some servers return multiple Content-Length headers :( + content_length = headers.getheaders("Content-Length")[0] + size = int(content_length) self.reporthook(url, filename, blocknum, bs, size) tfp = open(filename,'wb') while True: @@ -642,7 +657,7 @@ if scheme=='svn' or scheme.startswith('svn+'): return self._download_svn(url, filename) elif scheme=='file': - return urllib2.url2pathname(urlparse.urlparse(url)[2]) + return urllib.url2pathname(urlparse.urlparse(url)[2]) else: self.url_ok(url, True) # raises error if not allowed return self._attempt_download(url, filename) @@ -791,7 +806,7 @@ def local_open(url): """Read a local path, with special support for directories""" scheme, server, path, param, query, frag = urlparse.urlparse(url) - filename = urllib2.url2pathname(path) + filename = urllib.url2pathname(path) if os.path.isfile(filename): return urllib2.urlopen(url) elif path.endswith('/') and os.path.isdir(filename): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/sandbox.py new/distribute-0.6.17/setuptools/sandbox.py --- old/distribute-0.6.14/setuptools/sandbox.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/sandbox.py 2011-05-26 12:13:22.000000000 +0200 @@ -1,4 +1,4 @@ -import os, sys, __builtin__, tempfile, operator +import os, sys, __builtin__, tempfile, operator, pkg_resources _os = sys.modules[os.name] try: _file = file @@ -19,6 +19,7 @@ if not os.path.isdir(temp_dir): os.makedirs(temp_dir) save_tmp = tempfile.tempdir save_modules = sys.modules.copy() + pr_state = pkg_resources.__getstate__() try: tempfile.tempdir = temp_dir os.chdir(setup_dir) @@ -36,6 +37,7 @@ raise # Normal exit, just return finally: + pkg_resources.__setstate__(pr_state) sys.modules.update(save_modules) for key in list(sys.modules): if key not in save_modules: del sys.modules[key] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/tests/test_develop.py new/distribute-0.6.17/setuptools/tests/test_develop.py --- old/distribute-0.6.14/setuptools/tests/test_develop.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/tests/test_develop.py 2011-05-30 17:55:12.000000000 +0200 @@ -43,7 +43,7 @@ site.USER_SITE = self.old_site def test_develop(self): - if sys.version < "2.6": + if sys.version < "2.6" or hasattr(sys, 'real_prefix'): return dist = Distribution() dist.script_name = 'setup.py' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/tests/test_packageindex.py new/distribute-0.6.17/setuptools/tests/test_packageindex.py --- old/distribute-0.6.14/setuptools/tests/test_packageindex.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/tests/test_packageindex.py 2011-05-16 14:05:34.000000000 +0200 @@ -108,5 +108,14 @@ # the link should be from the index self.assert_('correct_md5' in pi['foobar'][0].location) + def test_parse_bdist_wininst(self): + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win32-py2.4.exe'), ('reportlab-2.5', '2.4', 'win32')) + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win32.exe'), ('reportlab-2.5', None, 'win32')) + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win-amd64-py2.7.exe'), ('reportlab-2.5', '2.7', 'win-amd64')) + self.assertEqual(setuptools.package_index.parse_bdist_wininst( + 'reportlab-2.5.win-amd64.exe'), ('reportlab-2.5', None, 'win-amd64')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/distribute-0.6.14/setuptools/tests/test_resources.py new/distribute-0.6.17/setuptools/tests/test_resources.py --- old/distribute-0.6.14/setuptools/tests/test_resources.py 2010-07-15 01:53:38.000000000 +0200 +++ new/distribute-0.6.17/setuptools/tests/test_resources.py 2011-05-20 09:48:10.000000000 +0200 @@ -3,7 +3,7 @@ # NOTE: the shebang and encoding lines are for ScriptHeaderTests; do not remove from unittest import TestCase, makeSuite; from pkg_resources import * from setuptools.command.easy_install import get_script_header, is_sh -import os, pkg_resources, sys, StringIO +import os, pkg_resources, sys, StringIO, tempfile, shutil try: frozenset except NameError: from sets import ImmutableSet as frozenset @@ -563,3 +563,29 @@ sys.platform = platform sys.stdout = stdout + + + +class NamespaceTests(TestCase): + + def setUp(self): + self._ns_pkgs = pkg_resources._namespace_packages.copy() + self._tmpdir = tempfile.mkdtemp(prefix="tests-distribute-") + sys.path.append(self._tmpdir) + + def tearDown(self): + shutil.rmtree(self._tmpdir) + pkg_resources._namespace_packages = self._ns_pkgs.copy() + sys.path.remove(self._tmpdir) + + def test_two_levels_deep(self): + os.makedirs(os.path.join(self._tmpdir, "pkg1", "pkg2")) + declare_namespace("pkg1") + self.assertTrue("pkg1" in pkg_resources._namespace_packages.keys()) + try: + declare_namespace("pkg1.pkg2") + except ImportError, e: + self.fail("Distribute tried to import the parent namespace package") + self.assertTrue("pkg1.pkg2" in pkg_resources._namespace_packages.keys()) + self.assertEqual(pkg_resources._namespace_packages["pkg1"], ["pkg1.pkg2"]) + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
