commit python-setuptools for openSUSE:Factory
Hello community, here is the log from the commit of package python-setuptools for openSUSE:Factory checked in at 2014-04-26 17:01:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-setuptools (Old) and /work/SRC/openSUSE:Factory/.python-setuptools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-setuptools" Changes: -------- --- /work/SRC/openSUSE:Factory/python-setuptools/python-setuptools.changes 2014-03-23 22:29:16.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-setuptools.new/python-setuptools.changes 2014-04-26 17:01:53.000000000 +0200 @@ -1,0 +2,24 @@ +Thu Apr 17 11:57:05 UTC 2014 - toddrme2178@gmail.com + +- Update to version 3.4.4 + * Issue #184: Correct failure where find_package over-matched + packages when directory traversal isn't short-circuited. +- Update to version 3.4.3 + * Issue #183: Really fix test command with Python 3.1. +- Update to version 3.4.2 + * Issue #183: Fix additional regression in test command on + Python 3.1. +- Update to version 3.4.1 + * Issue #180: Fix regression in test command not caught + by py.test-run tests. +- Update to version 3.4 + * Issue #176: Add parameter to the test command to support a + custom test runner: --test-runner or -r. + * Issue #177: Now assume most common invocation to install + command on platforms/environments without stack support + (issuing a warning). Setuptools now installs naturally on + IronPython. Behavior on CPython should be unchanged. +- Remove %check, which now depends on pytest and thus introduces + a dependency loop (setuptools->pytest->py->setuptools) + +------------------------------------------------------------------- Old: ---- setuptools-3.3.tar.gz New: ---- setuptools-3.4.4.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-setuptools.spec ++++++ --- /var/tmp/diff_new_pack.k7Goqi/_old 2014-04-26 17:01:54.000000000 +0200 +++ /var/tmp/diff_new_pack.k7Goqi/_new 2014-04-26 17:01:54.000000000 +0200 @@ -17,7 +17,7 @@ Name: python-setuptools -Version: 3.3 +Version: 3.4.4 Release: 0 Url: http://pypi.python.org/pypi/setuptools Summary: Easily download, build, install, upgrade, and uninstall Python packages @@ -65,9 +65,6 @@ touch %{buildroot}%{_sysconfdir}/alternatives/easy_install ln -sf %{_sysconfdir}/alternatives/easy_install %{buildroot}/%{_bindir}/easy_install -%check -python setup.py test - %post update-alternatives \ --install %{_bindir}/easy_install easy_install %{_bindir}/easy_install-%{py_ver} 20 ++++++ setuptools-3.3.tar.gz -> setuptools-3.4.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/CHANGES (links).txt new/setuptools-3.4.4/CHANGES (links).txt --- old/setuptools-3.3/CHANGES (links).txt 2014-03-16 10:04:35.000000000 +0100 +++ new/setuptools-3.4.4/CHANGES (links).txt 2014-04-11 06:50:39.000000000 +0200 @@ -2,6 +2,42 @@ CHANGES ======= +----- +3.4.4 +----- + +* `Issue #184 <https://bitbucket.org/pypa/setuptools/issue/184>`_: Correct failure where find_package over-matched packages + when directory traversal isn't short-circuited. + +----- +3.4.3 +----- + +* `Issue #183 <https://bitbucket.org/pypa/setuptools/issue/183>`_: Really fix test command with Python 3.1. + +----- +3.4.2 +----- + +* `Issue #183 <https://bitbucket.org/pypa/setuptools/issue/183>`_: Fix additional regression in test command on Python 3.1. + +----- +3.4.1 +----- + +* `Issue #180 <https://bitbucket.org/pypa/setuptools/issue/180>`_: Fix regression in test command not caught by py.test-run tests. + +--- +3.4 +--- + +* `Issue #176 <https://bitbucket.org/pypa/setuptools/issue/176>`_: Add parameter to the test command to support a custom test + runner: --test-runner or -r. +* `Issue #177 <https://bitbucket.org/pypa/setuptools/issue/177>`_: Now assume most common invocation to install command on + platforms/environments without stack support (issuing a warning). Setuptools + now installs naturally on IronPython. Behavior on CPython should be + unchanged. + --- 3.3 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/CHANGES.txt new/setuptools-3.4.4/CHANGES.txt --- old/setuptools-3.3/CHANGES.txt 2014-03-16 09:02:09.000000000 +0100 +++ new/setuptools-3.4.4/CHANGES.txt 2014-04-11 06:44:36.000000000 +0200 @@ -2,6 +2,42 @@ CHANGES ======= +----- +3.4.4 +----- + +* Issue #184: Correct failure where find_package over-matched packages + when directory traversal isn't short-circuited. + +----- +3.4.3 +----- + +* Issue #183: Really fix test command with Python 3.1. + +----- +3.4.2 +----- + +* Issue #183: Fix additional regression in test command on Python 3.1. + +----- +3.4.1 +----- + +* Issue #180: Fix regression in test command not caught by py.test-run tests. + +--- +3.4 +--- + +* Issue #176: Add parameter to the test command to support a custom test + runner: --test-runner or -r. +* Issue #177: Now assume most common invocation to install command on + platforms/environments without stack support (issuing a warning). Setuptools + now installs naturally on IronPython. Behavior on CPython should be + unchanged. + --- 3.3 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/PKG-INFO new/setuptools-3.4.4/PKG-INFO --- old/setuptools-3.3/PKG-INFO 2014-03-16 10:04:38.000000000 +0100 +++ new/setuptools-3.4.4/PKG-INFO 2014-04-11 06:50:42.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: setuptools -Version: 3.3 +Version: 3.4.4 Summary: Easily download, build, install, upgrade, and uninstall Python packages Home-page: https://pypi.python.org/pypi/setuptools Author: Python Packaging Authority @@ -222,6 +222,42 @@ CHANGES ======= + ----- + 3.4.4 + ----- + + * `Issue #184 <https://bitbucket.org/pypa/setuptools/issue/184>`_: Correct failure where find_package over-matched packages + when directory traversal isn't short-circuited. + + ----- + 3.4.3 + ----- + + * `Issue #183 <https://bitbucket.org/pypa/setuptools/issue/183>`_: Really fix test command with Python 3.1. + + ----- + 3.4.2 + ----- + + * `Issue #183 <https://bitbucket.org/pypa/setuptools/issue/183>`_: Fix additional regression in test command on Python 3.1. + + ----- + 3.4.1 + ----- + + * `Issue #180 <https://bitbucket.org/pypa/setuptools/issue/180>`_: Fix regression in test command not caught by py.test-run tests. + + --- + 3.4 + --- + + * `Issue #176 <https://bitbucket.org/pypa/setuptools/issue/176>`_: Add parameter to the test command to support a custom test + runner: --test-runner or -r. + * `Issue #177 <https://bitbucket.org/pypa/setuptools/issue/177>`_: Now assume most common invocation to install command on + platforms/environments without stack support (issuing a warning). Setuptools + now installs naturally on IronPython. Behavior on CPython should be + unchanged. + --- 3.3 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/docs/setuptools.txt new/setuptools-3.4.4/docs/setuptools.txt --- old/setuptools-3.3/docs/setuptools.txt 2014-03-16 09:53:16.000000000 +0100 +++ new/setuptools-3.4.4/docs/setuptools.txt 2014-04-08 01:07:02.000000000 +0200 @@ -276,7 +276,7 @@ A boolean (True or False) flag specifying whether the project can be safely installed and run from a zip file. If this argument is not supplied, the ``bdist_egg`` command will have to analyze all of your - project's contents for possible problems each time it buids an egg. + project's contents for possible problems each time it builds an egg. ``install_requires`` A string or list of strings specifying what other distributions need to @@ -426,9 +426,9 @@ ``setup()`` arguments, but that's just a normal distutils thing.) Anyway, ``find_packages()`` walks the target directory, filtering by inclusion -patterns, and finds Python -packages by looking for ``__init__.py`` files. It then filters the list of -packages using the exclusion patterns. +patterns, and finds Python packages (any directory). On Python 3.2 and +earlier, packages are only recognized if they include an ``__init__.py`` file. +Finally, exclusion patterns are applied to remove matching packages. Inclusion and exclusion patterns are package names, optionally including wildcards. For @@ -2435,7 +2435,7 @@ -------------------------------- -Extending and Reusing Distribute +Extending and Reusing Setuptools -------------------------------- Creating ``distutils`` Extensions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/ez_setup.py new/setuptools-3.4.4/ez_setup.py --- old/setuptools-3.3/ez_setup.py 2014-03-16 09:01:53.000000000 +0100 +++ new/setuptools-3.4.4/ez_setup.py 2014-04-08 01:14:18.000000000 +0200 @@ -31,7 +31,7 @@ except ImportError: USER_SITE = None -DEFAULT_VERSION = "3.3" +DEFAULT_VERSION = "3.4.4" DEFAULT_URL = "https://pypi.python.org/packages/source/s/setuptools/" def _python_cmd(*args): @@ -181,7 +181,7 @@ try: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: + except Exception: return False finally: devnull.close() @@ -199,7 +199,7 @@ try: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: + except Exception: return False finally: devnull.close() @@ -217,7 +217,7 @@ try: try: subprocess.check_call(cmd, stdout=devnull, stderr=devnull) - except: + except Exception: return False finally: devnull.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setup.cfg new/setuptools-3.4.4/setup.cfg --- old/setuptools-3.3/setup.cfg 2014-03-16 10:04:38.000000000 +0100 +++ new/setuptools-3.4.4/setup.cfg 2014-04-11 06:50:42.000000000 +0200 @@ -22,3 +22,6 @@ [wheel] universal = 1 +[pytest] +addopts = --ignore tests/manual_test.py --ignore tests/shlib_test + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setup.py new/setuptools-3.4.4/setup.py --- old/setuptools-3.3/setup.py 2014-03-15 13:37:21.000000000 +0100 +++ new/setuptools-3.4.4/setup.py 2014-04-08 01:07:02.000000000 +0200 @@ -4,6 +4,7 @@ import os import sys import textwrap +import contextlib # Allow to run setup.py from another directory. os.chdir(os.path.dirname(os.path.abspath(__file__))) @@ -63,22 +64,27 @@ class test(_test): """Specific test class to avoid rewriting the entry_points.txt""" def run(self): + with self._save_entry_points(): + _test.run(self) + + @contextlib.contextmanager + def _save_entry_points(self): entry_points = os.path.join('setuptools.egg-info', 'entry_points.txt') if not os.path.exists(entry_points): - _test.run(self) - return # even though _test.run will raise SystemExit + yield + return # save the content - with open(entry_points) as f: + with open(entry_points, 'rb') as f: ep_content = f.read() - # run the test + # run the tests try: - _test.run(self) + yield finally: # restore the file - with open(entry_points, 'w') as f: + with open(entry_points, 'wb') as f: f.write(ep_content) @@ -103,6 +109,8 @@ package_data.setdefault('setuptools', []).extend(['*.exe']) package_data.setdefault('setuptools.command', []).extend(['*.xml']) +pytest_runner = ['pytest-runner'] if 'ptr' in sys.argv else [] + setup_params = dict( name="setuptools", version=main_ns['__version__'], @@ -144,6 +152,7 @@ "packages = setuptools.dist:check_packages", "dependency_links = setuptools.dist:assert_string_list", "test_loader = setuptools.dist:check_importable", + "test_runner = setuptools.dist:check_importable", "use_2to3 = setuptools.dist:assert_bool", "convert_2to3_doctests = setuptools.dist:assert_string_list", "use_2to3_fixers = setuptools.dist:assert_string_list", @@ -196,7 +205,12 @@ 'https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#...', ], scripts = [], - # tests_require = "setuptools[ssl]", + tests_require = [ + 'setuptools[ssl]', + 'pytest', + ], + setup_requires = [ + ] + pytest_runner, ) if __name__ == '__main__': diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/__init__.py new/setuptools-3.4.4/setuptools/__init__.py --- old/setuptools-3.3/setuptools/__init__.py 2014-03-16 09:02:09.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/__init__.py 2014-04-11 06:43:17.000000000 +0200 @@ -12,6 +12,7 @@ from setuptools.extension import Extension from setuptools.dist import Distribution, Feature, _get_unpatched from setuptools.depends import Require +from setuptools.compat import filterfalse __all__ = [ 'setup', 'Distribution', 'Feature', 'Command', 'Extension', 'Require', @@ -28,45 +29,87 @@ # Standard package names for fixer packages lib2to3_fixer_packages = ['lib2to3.fixes'] -def find_packages(where='.', exclude=(), include=()): - """Return a list all Python packages found within directory 'where' - 'where' should be supplied as a "cross-platform" (i.e. URL-style) path; it - will be converted to the appropriate local path syntax. 'exclude' is a - sequence of package names to exclude; '*' can be used as a wildcard in the - names, such that 'foo.*' will exclude all subpackages of 'foo' (but not - 'foo' itself). - - 'include' is a sequence of package names to include. If it's specified, - only the named packages will be included. If it's not specified, all found - packages will be included. 'include' can contain shell style wildcard - patterns just like 'exclude'. - - The list of included packages is built up first and then any explicitly - excluded packages are removed from it. - """ - out = [] - stack=[(convert_path(where), '')] - include = list(include) - exclude = list(exclude) + ['ez_setup', '*__pycache__'] - while stack: - where,prefix = stack.pop(0) - for name in os.listdir(where): - fn = os.path.join(where,name) - looks_like_package = ( - '.' not in name - and os.path.isdir(fn) - and os.path.isfile(os.path.join(fn, '__init__.py')) - ) - if looks_like_package: - pkg_name = prefix + name - if (not include or - any(fnmatchcase(pkg_name, pat) for pat in include)): - out.append(pkg_name) - stack.append((fn, pkg_name + '.')) - for pat in exclude: - out = [item for item in out if not fnmatchcase(item,pat)] - return out +class PackageFinder(object): + @classmethod + def find(cls, where='.', exclude=(), include=('*',)): + """Return a list all Python packages found within directory 'where' + + 'where' should be supplied as a "cross-platform" (i.e. URL-style) + path; it will be converted to the appropriate local path syntax. + 'exclude' is a sequence of package names to exclude; '*' can be used + as a wildcard in the names, such that 'foo.*' will exclude all + subpackages of 'foo' (but not 'foo' itself). + + 'include' is a sequence of package names to include. If it's + specified, only the named packages will be included. If it's not + specified, all found packages will be included. 'include' can contain + shell style wildcard patterns just like 'exclude'. + + The list of included packages is built up first and then any + explicitly excluded packages are removed from it. + """ + out = cls._find_packages_iter(convert_path(where)) + out = cls.require_parents(out) + includes = cls._build_filter(*include) + excludes = cls._build_filter('ez_setup', '*__pycache__', *exclude) + out = filter(includes, out) + out = filterfalse(excludes, out) + return list(out) + + @staticmethod + def require_parents(packages): + """ + Exclude any apparent package that apparently doesn't include its + parent. + + For example, exclude 'foo.bar' if 'foo' is not present. + """ + found = [] + for pkg in packages: + base, sep, child = pkg.rpartition('.') + if base and base not in found: + continue + found.append(pkg) + yield pkg + + @staticmethod + def _all_dirs(base_path): + """ + Return all dirs in base_path, relative to base_path + """ + for root, dirs, files in os.walk(base_path): + for dir in dirs: + yield os.path.relpath(os.path.join(root, dir), base_path) + + @classmethod + def _find_packages_iter(cls, base_path): + dirs = cls._all_dirs(base_path) + suitable = filterfalse(lambda n: '.' in n, dirs) + return ( + path.replace(os.path.sep, '.') + for path in suitable + if cls._looks_like_package(os.path.join(base_path, path)) + ) + + @staticmethod + def _looks_like_package(path): + return os.path.isfile(os.path.join(path, '__init__.py')) + + @staticmethod + def _build_filter(*patterns): + """ + Given a list of patterns, return a callable that will be true only if + the input matches one of the patterns. + """ + return lambda name: any(fnmatchcase(name, pat=pat) for pat in patterns) + +class PEP420PackageFinder(PackageFinder): + @staticmethod + def _looks_like_package(path): + return True + +find_packages = PackageFinder.find setup = distutils.core.setup diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/command/bdist_egg.py new/setuptools-3.4.4/setuptools/command/bdist_egg.py --- old/setuptools-3.3/setuptools/command/bdist_egg.py 2014-03-06 15:48:25.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/command/bdist_egg.py 2014-04-08 01:14:18.000000000 +0200 @@ -3,7 +3,10 @@ Build .egg distributions""" # This module should be kept compatible with Python 2.3 -import sys, os, marshal +import sys +import os +import marshal +import textwrap from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: @@ -32,21 +35,17 @@ return filename def write_stub(resource, pyfile): - f = open(pyfile,'w') - f.write('\n'.join([ - "def __bootstrap__():", - " global __bootstrap__, __loader__, __file__", - " import sys, pkg_resources, imp", - " __file__ = pkg_resources.resource_filename(__name__,%r)" - % resource, - " __loader__ = None; del __bootstrap__, __loader__", - " imp.load_dynamic(__name__,__file__)", - "__bootstrap__()", - "" # terminal \n - ])) - f.close() - - + _stub_template = textwrap.dedent(""" + def __bootstrap__(): + global __bootstrap__, __loader__, __file__ + import sys, pkg_resources, imp + __file__ = pkg_resources.resource_filename(__name__, %r) + __loader__ = None; del __bootstrap__, __loader__ + imp.load_dynamic(__name__,__file__) + __bootstrap__() + """).lstrip() + with open(pyfile, 'w') as f: + f.write(_stub_template % resource) class bdist_egg(Command): @@ -56,41 +55,24 @@ user_options = [ ('bdist-dir=', 'b', "temporary directory for creating the distribution"), - ('plat-name=', 'p', - "platform name to embed in generated filenames " - "(default: %s)" % get_build_platform()), + ('plat-name=', 'p', "platform name to embed in generated filenames " + "(default: %s)" % get_build_platform()), ('exclude-source-files', None, - "remove all .py files from the generated egg"), + "remove all .py files from the generated egg"), ('keep-temp', 'k', - "keep the pseudo-installation tree around after " + - "creating the distribution archive"), + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), ('dist-dir=', 'd', - "directory to put final built distributions in"), + "directory to put final built distributions in"), ('skip-build', None, - "skip rebuilding everything (for testing/debugging)"), + "skip rebuilding everything (for testing/debugging)"), ] boolean_options = [ 'keep-temp', 'skip-build', 'exclude-source-files' ] - - - - - - - - - - - - - - - - - def initialize_options (self): + def initialize_options(self): self.bdist_dir = None self.plat_name = None self.keep_temp = 0 @@ -99,7 +81,6 @@ self.egg_output = None self.exclude_source_files = None - def finalize_options(self): ei_cmd = self.ei_cmd = self.get_finalized_command("egg_info") self.egg_info = ei_cmd.egg_info @@ -124,13 +105,6 @@ self.egg_output = os.path.join(self.dist_dir, basename+'.egg') - - - - - - - def do_install_data(self): # Hack for packages that install data to install's --install-lib self.get_finalized_command('install').install_lib = self.bdist_dir @@ -156,11 +130,9 @@ finally: self.distribution.data_files = old - def get_outputs(self): return [self.egg_output] - def call_command(self,cmdname,**kw): """Invoke reinitialized command `cmdname` with keyword args""" for dirname in INSTALL_DIRECTORY_ATTRS: @@ -171,7 +143,6 @@ self.run_command(cmdname) return cmd - def run(self): # Generate metadata first self.run_command("egg_info") @@ -179,7 +150,8 @@ # pull their data path from the install_lib command. log.info("installing library code to %s" % self.bdist_dir) instcmd = self.get_finalized_command('install') - old_root = instcmd.root; instcmd.root = None + old_root = instcmd.root + instcmd.root = None if self.distribution.has_c_libraries() and not self.skip_build: self.run_command('build_clib') cmd = self.call_command('install_lib', warn_dir=0) @@ -242,7 +214,7 @@ # Make the archive make_zipfile(self.egg_output, archive_root, verbose=self.verbose, - dry_run=self.dry_run, mode=self.gen_header()) + dry_run=self.dry_run, mode=self.gen_header()) if not self.keep_temp: remove_tree(self.bdist_dir, dry_run=self.dry_run) @@ -250,9 +222,6 @@ getattr(self.distribution,'dist_files',[]).append( ('bdist_egg',get_python_version(),self.egg_output)) - - - def zap_pyfiles(self): log.info("Removing .py files from temporary directory") for base,dirs,files in walk_egg(self.bdist_dir): @@ -269,8 +238,6 @@ log.warn("zip_safe flag not set; analyzing archive contents...") return analyze_egg(self.bdist_dir, self.stubs) - - def gen_header(self): epm = EntryPoint.parse_map(self.distribution.entry_points or '') ep = epm.get('setuptools.installation',{}).get('eggsecutable') @@ -311,7 +278,6 @@ f.close() return 'a' - def copy_metadata_to(self, target_dir): "Copy metadata (egg info) to the target_dir" # normalize the path (so that a forward-slash in egg_info will @@ -355,8 +321,6 @@ NATIVE_EXTENSIONS = dict.fromkeys('.dll .so .dylib .pyd'.split()) - - def walk_egg(egg_dir): """Walk an unpacked egg's contents, skipping the metadata directory""" walker = os.walk(egg_dir) @@ -391,7 +355,9 @@ if safe is None or bool(safe) != flag: os.unlink(fn) elif safe is not None and bool(safe)==flag: - f=open(fn,'wt'); f.write('\n'); f.close() + f = open(fn,'wt') + f.write('\n') + f.close() safety_flags = { True: 'zip-safe', @@ -410,8 +376,10 @@ skip = 8 # skip magic & date else: skip = 12 # skip magic & date & file size - f = open(filename,'rb'); f.read(skip) - code = marshal.load(f); f.close() + f = open(filename,'rb') + f.read(skip) + code = marshal.load(f) + f.close() safe = True symbols = dict.fromkeys(iter_symbols(code)) for bad in ['__file__', '__path__']: @@ -451,39 +419,6 @@ log.warn("Please ask the author to include a 'zip_safe'" " setting (either True or False) in the package's setup.py") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Attribute names of options for commands that might need to be convinced to # install to the egg build directory @@ -492,8 +427,7 @@ ] def make_zipfile(zip_filename, base_dir, verbose=0, dry_run=0, compress=None, - mode='w' -): + mode='w'): """Create a zip file from all the files under 'base_dir'. The output zip file will be named 'base_dir' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed @@ -526,4 +460,3 @@ for dirname, dirs, files in os.walk(base_dir): visit(None, dirname, files) return zip_filename -# diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/command/bdist_rpm.py new/setuptools-3.4.4/setuptools/command/bdist_rpm.py --- old/setuptools-3.3/setuptools/command/bdist_rpm.py 2014-02-12 04:53:22.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/command/bdist_rpm.py 2014-04-08 01:07:02.000000000 +0200 @@ -1,51 +1,29 @@ -# This is just a kludge so that bdist_rpm doesn't guess wrong about the -# distribution name and version, if the egg_info command is going to alter -# them, another kludge to allow you to build old-style non-egg RPMs, and -# finally, a kludge to track .rpm files for uploading when run on Python <2.5. - from distutils.command.bdist_rpm import bdist_rpm as _bdist_rpm -import sys, os class bdist_rpm(_bdist_rpm): + """ + Override the default bdist_rpm behavior to do the following: - def initialize_options(self): - _bdist_rpm.initialize_options(self) - self.no_egg = None - - if sys.version<"2.5": - # Track for uploading any .rpm file(s) moved to self.dist_dir - def move_file(self, src, dst, level=1): - _bdist_rpm.move_file(self, src, dst, level) - if dst==self.dist_dir and src.endswith('.rpm'): - getattr(self.distribution,'dist_files',[]).append( - ('bdist_rpm', - src.endswith('.src.rpm') and 'any' or sys.version[:3], - os.path.join(dst, os.path.basename(src))) - ) + 1. Run egg_info to ensure the name and version are properly calculated. + 2. Always run 'install' using --single-version-externally-managed to + disable eggs in RPM distributions. + 3. Replace dash with underscore in the version numbers for better RPM + compatibility. + """ def run(self): - self.run_command('egg_info') # ensure distro name is up-to-date - _bdist_rpm.run(self) - - - - - - - - - - - + # ensure distro name is up-to-date + self.run_command('egg_info') + _bdist_rpm.run(self) def _make_spec_file(self): version = self.distribution.get_version() rpmversion = version.replace('-','_') spec = _bdist_rpm._make_spec_file(self) - line23 = '%define version '+version - line24 = '%define version '+rpmversion - spec = [ + line23 = '%define version ' + version + line24 = '%define version ' + rpmversion + spec = [ line.replace( "Source0: %{name}-%{version}.tar", "Source0: %{name}-%{unmangled_version}.tar" @@ -55,28 +33,10 @@ ).replace( "%setup", "%setup -n %{name}-%{unmangled_version}" - ).replace(line23,line24) + ).replace(line23, line24) for line in spec ] - spec.insert(spec.index(line24)+1, "%define unmangled_version "+version) + insert_loc = spec.index(line24) + 1 + unmangled_version = "%define unmangled_version " + version + spec.insert(insert_loc, unmangled_version) return spec - - - - - - - - - - - - - - - - - - - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/command/egg_info.py new/setuptools-3.4.4/setuptools/command/egg_info.py --- old/setuptools-3.3/setuptools/command/egg_info.py 2014-02-12 04:53:22.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/command/egg_info.py 2014-04-08 01:07:02.000000000 +0200 @@ -369,10 +369,10 @@ data = ep elif ep is not None: data = [] - for section, contents in ep.items(): + for section, contents in sorted(ep.items()): if not isinstance(contents,basestring): contents = EntryPoint.parse_group(section, contents) - contents = '\n'.join(map(str,contents.values())) + contents = '\n'.join(sorted(map(str,contents.values()))) data.append('[%s]\n%s\n\n' % (section,contents)) data = ''.join(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/command/install.py new/setuptools-3.4.4/setuptools/command/install.py --- old/setuptools-3.3/setuptools/command/install.py 2014-03-15 13:37:21.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/command/install.py 2014-04-08 01:07:02.000000000 +0200 @@ -1,6 +1,8 @@ import setuptools -import sys +import inspect import glob +import warnings +import platform from distutils.command.install import install as _install from distutils.errors import DistutilsArgError @@ -52,26 +54,39 @@ if self.old_and_unmanageable or self.single_version_externally_managed: return _install.run(self) - # Attempt to detect whether we were called from setup() or by another - # command. If we were called by setup(), our caller will be the - # 'run_command' method in 'distutils.dist', and *its* caller will be - # the 'run_commands' method. If we were called any other way, our - # immediate caller *might* be 'run_command', but it won't have been - # called by 'run_commands'. This is slightly kludgy, but seems to - # work. - # - caller = sys._getframe(2) - caller_module = caller.f_globals.get('__name__','') - caller_name = caller.f_code.co_name - - if caller_module != 'distutils.dist' or caller_name!='run_commands': - # We weren't called from the command line or setup(), so we - # should run in backward-compatibility mode to support bdist_* - # commands. + if not self._called_from_setup(inspect.currentframe()): + # Run in backward-compatibility mode to support bdist_* commands. _install.run(self) else: self.do_egg_install() + @staticmethod + def _called_from_setup(run_frame): + """ + Attempt to detect whether run() was called from setup() or by another + command. If called by setup(), the parent caller will be the + 'run_command' method in 'distutils.dist', and *its* caller will be + the 'run_commands' method. If called any other way, the + immediate caller *might* be 'run_command', but it won't have been + called by 'run_commands'. Return True in that case or if a call stack + is unavailable. Return False otherwise. + """ + if run_frame is None: + msg = "Call stack not available. bdist_* commands may fail." + warnings.warn(msg) + if platform.python_implementation() == 'IronPython': + msg = "For best results, pass -X:Frames to enable call stack." + warnings.warn(msg) + return True + res = inspect.getouterframes(run_frame)[2] + caller, = res[:1] + info = inspect.getframeinfo(caller) + caller_module = caller.f_globals.get('__name__', '') + return ( + caller_module == 'distutils.dist' + and info.function == 'run_commands' + ) + def do_egg_install(self): easy_install = self.distribution.get_command_class('easy_install') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/command/test.py new/setuptools-3.4.4/setuptools/command/test.py --- old/setuptools-3.3/setuptools/command/test.py 2014-03-06 15:48:25.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/command/test.py 2014-04-08 01:14:18.000000000 +0200 @@ -1,10 +1,15 @@ +import unittest +from unittest import TestLoader + from setuptools import Command from distutils.errors import DistutilsOptionError import sys from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint) -from unittest import TestLoader + +from setuptools.py31compat import unittest_main + class ScanningLoader(TestLoader): @@ -16,26 +21,24 @@ the return value to the tests. """ tests = [] - if module.__name__!='setuptools.tests.doctest': # ugh - tests.append(TestLoader.loadTestsFromModule(self,module)) + if module.__name__ != 'setuptools.tests.doctest': # ugh + tests.append(TestLoader.loadTestsFromModule(self, module)) if hasattr(module, "additional_tests"): tests.append(module.additional_tests()) if hasattr(module, '__path__'): for file in resource_listdir(module.__name__, ''): - if file.endswith('.py') and file!='__init__.py': - submodule = module.__name__+'.'+file[:-3] + if file.endswith('.py') and file != '__init__.py': + submodule = module.__name__ + '.' + file[:-3] else: - if resource_exists( - module.__name__, file+'/__init__.py' - ): + if resource_exists(module.__name__, file + '/__init__.py'): submodule = module.__name__+'.'+file else: continue tests.append(self.loadTestsFromName(submodule)) - if len(tests)!=1: + if len(tests) != 1: return self.suiteClass(tests) else: return tests[0] # don't create a nested suite for only one return @@ -51,12 +54,14 @@ ('test-module=','m', "Run 'test_suite' in specified module"), ('test-suite=','s', "Test suite to run (e.g. 'some_module.test_suite')"), + ('test-runner=', 'r', "Test runner to use"), ] def initialize_options(self): self.test_suite = None self.test_module = None self.test_loader = None + self.test_runner = None def finalize_options(self): @@ -64,7 +69,7 @@ if self.test_module is None: self.test_suite = self.distribution.test_suite else: - self.test_suite = self.test_module+".test_suite" + self.test_suite = self.test_module + ".test_suite" elif self.test_module: raise DistutilsOptionError( "You may specify a module or a suite, but not both" @@ -75,12 +80,18 @@ if self.verbose: self.test_args.insert(0,'--verbose') if self.test_loader is None: - self.test_loader = getattr(self.distribution,'test_loader',None) + self.test_loader = getattr(self.distribution, 'test_loader', None) if self.test_loader is None: self.test_loader = "setuptools.command.test:ScanningLoader" + if self.test_runner is None: + self.test_runner = getattr(self.distribution, 'test_runner', None) def with_project_on_sys_path(self, func): - if sys.version_info >= (3,) and getattr(self.distribution, 'use_2to3', False): + with_2to3 = ( + sys.version_info >= (3,) + and getattr(self.distribution, 'use_2to3', False) + ) + if with_2to3: # If we run 2to3 we can not do this inplace: # Ensure metadata is up-to-date @@ -135,8 +146,6 @@ self.with_project_on_sys_path(self.run_tests) def run_tests(self): - import unittest - # Purge modules under test from sys.modules. The test loader will # re-import them from the build location. Required when 2to3 is used # with namespace packages. @@ -152,10 +161,19 @@ del_modules.append(name) list(map(sys.modules.__delitem__, del_modules)) - loader_ep = EntryPoint.parse("x="+self.test_loader) - loader_class = loader_ep.load(require=False) - cks = loader_class() - unittest.main( + unittest_main( None, None, [unittest.__file__]+self.test_args, - testLoader = cks + testLoader=self._resolve_as_ep(self.test_loader), + testRunner=self._resolve_as_ep(self.test_runner), ) + + @staticmethod + def _resolve_as_ep(val): + """ + Load the indicated attribute value, called, as a as if it were + specified as an entry point. + """ + if val is None: + return + parsed = EntryPoint.parse("x=" + val) + return parsed.load(require=False)() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/py31compat.py new/setuptools-3.4.4/setuptools/py31compat.py --- old/setuptools-3.3/setuptools/py31compat.py 2014-03-06 15:48:25.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/py31compat.py 2014-04-08 01:14:18.000000000 +0200 @@ -1,3 +1,6 @@ +import sys +import unittest + __all__ = ['get_config_vars', 'get_path'] try: @@ -35,3 +38,15 @@ except OSError: #removal errors are not the only possible pass self.name = None + + +unittest_main = unittest.main + +_PY31 = (3, 1) <= sys.version_info[:2] < (3, 2) +if _PY31: + # on Python 3.1, translate testRunner==None to TextTestRunner + # for compatibility with Python 2.6, 2.7, and 3.2+ + def unittest_main(*args, **kwargs): + if 'testRunner' in kwargs and kwargs['testRunner'] is None: + kwargs['testRunner'] = unittest.TextTestRunner + return unittest.main(*args, **kwargs) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/tests/test_easy_install.py new/setuptools-3.4.4/setuptools/tests/test_easy_install.py --- old/setuptools-3.3/setuptools/tests/test_easy_install.py 2014-03-15 13:37:21.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/tests/test_easy_install.py 2014-04-08 01:14:18.000000000 +0200 @@ -23,6 +23,7 @@ from pkg_resources import Distribution as PRDistribution import setuptools.tests.server import pkg_resources +from .py26compat import skipIf class FakeDist(object): def get_entry_map(self, group): @@ -225,6 +226,9 @@ else: del os.environ['PYTHONPATH'] + @skipIf(sys.version_info < (3, 4), + "Test fails on Python 3.3 and earlier due to bug in inspect but only " + "when run under setup.py test") def test_setup_requires(self): """Regression test for Distribute issue #318 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/tests/test_find_packages.py new/setuptools-3.4.4/setuptools/tests/test_find_packages.py --- old/setuptools-3.3/setuptools/tests/test_find_packages.py 2014-03-16 09:53:16.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/tests/test_find_packages.py 2014-04-08 01:20:00.000000000 +0200 @@ -4,8 +4,10 @@ import tempfile import unittest +import setuptools from setuptools import find_packages +find_420_packages = setuptools.PEP420PackageFinder.find class TestFindPackages(unittest.TestCase): @@ -63,6 +65,11 @@ packages = find_packages(self.dist_dir) self.assertEqual(packages, ['pkg', 'pkg.subpkg']) + def test_exclude(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_packages(self.dist_dir, exclude=('pkg.*',)) + assert packages == ['pkg'] + def test_include_excludes_other(self): """ If include is specified, other packages should be excluded. @@ -80,3 +87,45 @@ self._touch('file.dat', data_dir) packages = find_packages(self.dist_dir) self.assertTrue('pkg.some.data' not in packages) + + def test_dir_with_packages_in_subdir_is_excluded(self): + """ + Ensure that a package in a non-package such as build/pkg/__init__.py + is excluded. + """ + build_dir = self._mkdir('build', self.dist_dir) + build_pkg_dir = self._mkdir('pkg', build_dir) + self._touch('__init__.py', build_pkg_dir) + packages = find_packages(self.dist_dir) + self.assertTrue('build.pkg' not in packages) + + def _assert_packages(self, actual, expected): + self.assertEqual(set(actual), set(expected)) + + def test_pep420_ns_package(self): + packages = find_420_packages( + self.dist_dir, include=['pkg*'], exclude=['pkg.subpkg.assets']) + self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + + def test_pep420_ns_package_no_includes(self): + packages = find_420_packages( + self.dist_dir, exclude=['pkg.subpkg.assets']) + self._assert_packages(packages, ['docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg']) + + def test_pep420_ns_package_no_includes_or_excludes(self): + packages = find_420_packages(self.dist_dir) + expected = [ + 'docs', 'pkg', 'pkg.nspkg', 'pkg.subpkg', 'pkg.subpkg.assets'] + self._assert_packages(packages, expected) + + def test_regular_package_with_nested_pep420_ns_packages(self): + self._touch('__init__.py', self.pkg_dir) + packages = find_420_packages( + self.dist_dir, exclude=['docs', 'pkg.subpkg.assets']) + self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) + + def test_pep420_ns_package_no_non_package_dirs(self): + shutil.rmtree(self.docs_dir) + shutil.rmtree(os.path.join(self.dist_dir, 'pkg/subpkg/assets')) + packages = find_420_packages(self.dist_dir) + self._assert_packages(packages, ['pkg', 'pkg.nspkg', 'pkg.subpkg']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools/version.py new/setuptools-3.4.4/setuptools/version.py --- old/setuptools-3.3/setuptools/version.py 2014-03-16 09:01:53.000000000 +0100 +++ new/setuptools-3.4.4/setuptools/version.py 2014-04-08 01:14:18.000000000 +0200 @@ -1 +1 @@ -__version__ = '3.3' +__version__ = '3.4.4' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/PKG-INFO new/setuptools-3.4.4/setuptools.egg-info/PKG-INFO --- old/setuptools-3.3/setuptools.egg-info/PKG-INFO 2014-03-16 10:04:36.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/PKG-INFO 2014-04-11 06:50:41.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: setuptools -Version: 3.3 +Version: 3.4.4 Summary: Easily download, build, install, upgrade, and uninstall Python packages Home-page: https://pypi.python.org/pypi/setuptools Author: Python Packaging Authority @@ -222,6 +222,42 @@ CHANGES ======= + ----- + 3.4.4 + ----- + + * `Issue #184 <https://bitbucket.org/pypa/setuptools/issue/184>`_: Correct failure where find_package over-matched packages + when directory traversal isn't short-circuited. + + ----- + 3.4.3 + ----- + + * `Issue #183 <https://bitbucket.org/pypa/setuptools/issue/183>`_: Really fix test command with Python 3.1. + + ----- + 3.4.2 + ----- + + * `Issue #183 <https://bitbucket.org/pypa/setuptools/issue/183>`_: Fix additional regression in test command on Python 3.1. + + ----- + 3.4.1 + ----- + + * `Issue #180 <https://bitbucket.org/pypa/setuptools/issue/180>`_: Fix regression in test command not caught by py.test-run tests. + + --- + 3.4 + --- + + * `Issue #176 <https://bitbucket.org/pypa/setuptools/issue/176>`_: Add parameter to the test command to support a custom test + runner: --test-runner or -r. + * `Issue #177 <https://bitbucket.org/pypa/setuptools/issue/177>`_: Now assume most common invocation to install command on + platforms/environments without stack support (issuing a warning). Setuptools + now installs naturally on IronPython. Behavior on CPython should be + unchanged. + --- 3.3 --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/SOURCES.txt new/setuptools-3.4.4/setuptools.egg-info/SOURCES.txt --- old/setuptools-3.3/setuptools.egg-info/SOURCES.txt 2014-03-16 10:04:38.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/SOURCES.txt 2014-04-11 06:50:42.000000000 +0200 @@ -59,9 +59,7 @@ setuptools.egg-info/PKG-INFO setuptools.egg-info/SOURCES.txt setuptools.egg-info/dependency_links.txt -setuptools.egg-info/dependency_links.txt.orig setuptools.egg-info/entry_points.txt -setuptools.egg-info/entry_points.txt.orig setuptools.egg-info/requires.txt setuptools.egg-info/requires.txt.orig setuptools.egg-info/top_level.txt @@ -146,7 +144,6 @@ setuptools/tests/svn_data/svn18_info.xml tests/api_tests.txt tests/manual_test.py -tests/test_ez_setup.py tests/test_pkg_resources.py tests/shlib_test/hello.c tests/shlib_test/hello.pyx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/dependency_links.txt.orig new/setuptools-3.4.4/setuptools.egg-info/dependency_links.txt.orig --- old/setuptools-3.3/setuptools.egg-info/dependency_links.txt.orig 2014-03-16 08:58:41.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/dependency_links.txt.orig 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -https://pypi.python.org/packages/source/c/certifi/certifi-1.0.1.tar.gz#md5=4... -https://pypi.python.org/packages/source/w/wincertstore/wincertstore-0.2.zip#... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/entry_points.txt new/setuptools-3.4.4/setuptools.egg-info/entry_points.txt --- old/setuptools-3.3/setuptools.egg-info/entry_points.txt 2014-03-16 10:04:36.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/entry_points.txt 2014-04-11 06:50:41.000000000 +0200 @@ -1,62 +1,63 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap +[console_scripts] +easy_install = setuptools.command.easy_install:main +easy_install-3.4 = setuptools.command.easy_install:main + +[distutils.commands] +alias = setuptools.command.alias:alias +bdist_egg = setuptools.command.bdist_egg:bdist_egg +bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm +bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst +build_ext = setuptools.command.build_ext:build_ext +build_py = setuptools.command.build_py:build_py +develop = setuptools.command.develop:develop +easy_install = setuptools.command.easy_install:easy_install +egg_info = setuptools.command.egg_info:egg_info +install = setuptools.command.install:install +install_egg_info = setuptools.command.install_egg_info:install_egg_info +install_lib = setuptools.command.install_lib:install_lib +install_scripts = setuptools.command.install_scripts:install_scripts +register = setuptools.command.register:register +rotate = setuptools.command.rotate:rotate +saveopts = setuptools.command.saveopts:saveopts +sdist = setuptools.command.sdist:sdist +setopt = setuptools.command.setopt:setopt +test = setuptools.command.test:test +upload_docs = setuptools.command.upload_docs:upload_docs [distutils.setup_keywords] -packages = setuptools.dist:check_packages +convert_2to3_doctests = setuptools.dist:assert_string_list +dependency_links = setuptools.dist:assert_string_list +eager_resources = setuptools.dist:assert_string_list entry_points = setuptools.dist:check_entry_points -test_suite = setuptools.dist:check_test_suite -include_package_data = setuptools.dist:assert_bool exclude_package_data = setuptools.dist:check_package_data -convert_2to3_doctests = setuptools.dist:assert_string_list extras_require = setuptools.dist:check_extras +include_package_data = setuptools.dist:assert_bool install_requires = setuptools.dist:check_requirements -use_2to3_fixers = setuptools.dist:assert_string_list -zip_safe = setuptools.dist:assert_bool namespace_packages = setuptools.dist:check_nsp +package_data = setuptools.dist:check_package_data +packages = setuptools.dist:check_packages test_loader = setuptools.dist:check_importable -use_2to3 = setuptools.dist:assert_bool -eager_resources = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list +test_runner = setuptools.dist:check_importable +test_suite = setuptools.dist:check_test_suite tests_require = setuptools.dist:check_requirements -package_data = setuptools.dist:check_package_data +use_2to3 = setuptools.dist:assert_bool use_2to3_exclude_fixers = setuptools.dist:assert_string_list - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.commands] -setopt = setuptools.command.setopt:setopt -easy_install = setuptools.command.easy_install:easy_install -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -register = setuptools.command.register:register -test = setuptools.command.test:test -install_scripts = setuptools.command.install_scripts:install_scripts -install = setuptools.command.install:install -alias = setuptools.command.alias:alias -bdist_egg = setuptools.command.bdist_egg:bdist_egg -build_py = setuptools.command.build_py:build_py -install_lib = setuptools.command.install_lib:install_lib -rotate = setuptools.command.rotate:rotate -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -egg_info = setuptools.command.egg_info:egg_info -develop = setuptools.command.develop:develop -install_egg_info = setuptools.command.install_egg_info:install_egg_info -build_ext = setuptools.command.build_ext:build_ext -sdist = setuptools.command.sdist:sdist -saveopts = setuptools.command.saveopts:saveopts -upload_docs = setuptools.command.upload_docs:upload_docs +use_2to3_fixers = setuptools.dist:assert_string_list +zip_safe = setuptools.dist:assert_bool [egg_info.writers] -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -entry_points.txt = setuptools.command.egg_info:write_entries PKG-INFO = setuptools.command.egg_info:write_pkg_info -depends.txt = setuptools.command.egg_info:warn_depends_obsolete dependency_links.txt = setuptools.command.egg_info:overwrite_arg -top_level.txt = setuptools.command.egg_info:write_toplevel_names +depends.txt = setuptools.command.egg_info:warn_depends_obsolete +eager_resources.txt = setuptools.command.egg_info:overwrite_arg +entry_points.txt = setuptools.command.egg_info:write_entries +namespace_packages.txt = setuptools.command.egg_info:overwrite_arg requires.txt = setuptools.command.egg_info:write_requirements +top_level.txt = setuptools.command.egg_info:write_toplevel_names -[console_scripts] -easy_install = setuptools.command.easy_install:main -easy_install-3.4 = setuptools.command.easy_install:main +[setuptools.file_finders] +svn_cvs = setuptools.command.sdist:_default_revctrl + +[setuptools.installation] +eggsecutable = setuptools.command.easy_install:bootstrap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/entry_points.txt.orig new/setuptools-3.4.4/setuptools.egg-info/entry_points.txt.orig --- old/setuptools-3.3/setuptools.egg-info/entry_points.txt.orig 2014-03-16 08:59:06.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/entry_points.txt.orig 1970-01-01 01:00:00.000000000 +0100 @@ -1,62 +0,0 @@ -[setuptools.installation] -eggsecutable = setuptools.command.easy_install:bootstrap - -[setuptools.file_finders] -svn_cvs = setuptools.command.sdist:_default_revctrl - -[distutils.setup_keywords] -tests_require = setuptools.dist:check_requirements -entry_points = setuptools.dist:check_entry_points -namespace_packages = setuptools.dist:check_nsp -eager_resources = setuptools.dist:assert_string_list -use_2to3_fixers = setuptools.dist:assert_string_list -packages = setuptools.dist:check_packages -package_data = setuptools.dist:check_package_data -test_loader = setuptools.dist:check_importable -convert_2to3_doctests = setuptools.dist:assert_string_list -dependency_links = setuptools.dist:assert_string_list -extras_require = setuptools.dist:check_extras -zip_safe = setuptools.dist:assert_bool -install_requires = setuptools.dist:check_requirements -include_package_data = setuptools.dist:assert_bool -use_2to3_exclude_fixers = setuptools.dist:assert_string_list -test_suite = setuptools.dist:check_test_suite -use_2to3 = setuptools.dist:assert_bool -exclude_package_data = setuptools.dist:check_package_data - -[egg_info.writers] -namespace_packages.txt = setuptools.command.egg_info:overwrite_arg -dependency_links.txt = setuptools.command.egg_info:overwrite_arg -PKG-INFO = setuptools.command.egg_info:write_pkg_info -entry_points.txt = setuptools.command.egg_info:write_entries -eager_resources.txt = setuptools.command.egg_info:overwrite_arg -requires.txt = setuptools.command.egg_info:write_requirements -depends.txt = setuptools.command.egg_info:warn_depends_obsolete -top_level.txt = setuptools.command.egg_info:write_toplevel_names - -[distutils.commands] -test = setuptools.command.test:test -install = setuptools.command.install:install -egg_info = setuptools.command.egg_info:egg_info -sdist = setuptools.command.sdist:sdist -upload_docs = setuptools.command.upload_docs:upload_docs -build_py = setuptools.command.build_py:build_py -bdist_wininst = setuptools.command.bdist_wininst:bdist_wininst -setopt = setuptools.command.setopt:setopt -install_lib = setuptools.command.install_lib:install_lib -bdist_rpm = setuptools.command.bdist_rpm:bdist_rpm -rotate = setuptools.command.rotate:rotate -bdist_egg = setuptools.command.bdist_egg:bdist_egg -install_scripts = setuptools.command.install_scripts:install_scripts -alias = setuptools.command.alias:alias -install_egg_info = setuptools.command.install_egg_info:install_egg_info -easy_install = setuptools.command.easy_install:easy_install -build_ext = setuptools.command.build_ext:build_ext -saveopts = setuptools.command.saveopts:saveopts -register = setuptools.command.register:register -develop = setuptools.command.develop:develop - -[console_scripts] -easy_install-3.4 = setuptools.command.easy_install:main -easy_install = setuptools.command.easy_install:main - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/requires.txt.orig new/setuptools-3.4.4/setuptools.egg-info/requires.txt.orig --- old/setuptools-3.3/setuptools.egg-info/requires.txt.orig 2014-03-16 08:58:41.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/requires.txt.orig 2014-04-11 06:40:55.000000000 +0200 @@ -1,7 +1,7 @@ -[ssl:sys_platform=='win32'] -wincertstore==0.2 - [certs] -certifi==1.0.1 \ No newline at end of file +certifi==1.0.1 + +[ssl:sys_platform=='win32'] +wincertstore==0.2 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/setuptools.egg-info/top_level.txt new/setuptools-3.4.4/setuptools.egg-info/top_level.txt --- old/setuptools-3.3/setuptools.egg-info/top_level.txt 2014-03-16 10:04:36.000000000 +0100 +++ new/setuptools-3.4.4/setuptools.egg-info/top_level.txt 2014-04-11 06:50:41.000000000 +0200 @@ -1,4 +1,4 @@ -_markerlib pkg_resources -setuptools easy_install +setuptools +_markerlib diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/tests/test_ez_setup.py new/setuptools-3.4.4/tests/test_ez_setup.py --- old/setuptools-3.3/tests/test_ez_setup.py 2014-02-12 04:53:22.000000000 +0100 +++ new/setuptools-3.4.4/tests/test_ez_setup.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,63 +0,0 @@ -import sys -import os -import tempfile -import unittest -import shutil -import copy - -CURDIR = os.path.abspath(os.path.dirname(__file__)) -TOPDIR = os.path.split(CURDIR)[0] -sys.path.insert(0, TOPDIR) - -from ez_setup import (use_setuptools, _build_egg, _python_cmd, _do_download, - _install, DEFAULT_URL, DEFAULT_VERSION) -import ez_setup - -class TestSetup(unittest.TestCase): - - def urlopen(self, url): - return open(self.tarball, 'rb') - - def setUp(self): - self.old_sys_path = copy.copy(sys.path) - self.cwd = os.getcwd() - self.tmpdir = tempfile.mkdtemp() - os.chdir(TOPDIR) - _python_cmd("setup.py", "-q", "egg_info", "-RDb", "''", "sdist", - "--dist-dir", "%s" % self.tmpdir) - tarball = os.listdir(self.tmpdir)[0] - self.tarball = os.path.join(self.tmpdir, tarball) - from setuptools.compat import urllib2 - urllib2.urlopen = self.urlopen - - def tearDown(self): - shutil.rmtree(self.tmpdir) - os.chdir(self.cwd) - sys.path = copy.copy(self.old_sys_path) - - def test_build_egg(self): - # making it an egg - egg = _build_egg('Egg to be built', self.tarball, self.tmpdir) - - # now trying to import it - sys.path[0] = egg - import setuptools - self.assertTrue(setuptools.__file__.startswith(egg)) - - def test_do_download(self): - tmpdir = tempfile.mkdtemp() - _do_download(DEFAULT_VERSION, DEFAULT_URL, tmpdir, 1) - import setuptools - self.assertTrue(setuptools.bootstrap_install_from.startswith(tmpdir)) - - def test_install(self): - def _faked(*args): - return True - ez_setup.python_cmd = _faked - _install(self.tarball) - - def test_use_setuptools(self): - self.assertEqual(use_setuptools(), None) - -if __name__ == '__main__': - unittest.main() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/setuptools-3.3/tests/test_pkg_resources.py new/setuptools-3.4.4/tests/test_pkg_resources.py --- old/setuptools-3.3/tests/test_pkg_resources.py 2014-02-12 04:53:22.000000000 +0100 +++ new/setuptools-3.4.4/tests/test_pkg_resources.py 2014-04-08 01:07:02.000000000 +0200 @@ -2,6 +2,8 @@ import tempfile import os import zipfile +import datetime +import time import pkg_resources @@ -10,6 +12,16 @@ except NameError: unicode = str +def timestamp(dt): + """ + Return a timestamp for a local, naive datetime instance. + """ + try: + return dt.timestamp() + except AttributeError: + # Python 3.2 and earlier + return time.mktime(dt.timetuple()) + class EggRemover(unicode): def __call__(self): if self in sys.path: @@ -20,6 +32,9 @@ class TestZipProvider(object): finalizers = [] + ref_time = datetime.datetime(2013, 5, 12, 13, 25, 0) + "A reference time for a file modification" + @classmethod def setup_class(cls): "create a zip egg and add it to sys.path" @@ -27,11 +42,11 @@ zip_egg = zipfile.ZipFile(egg, 'w') zip_info = zipfile.ZipInfo() zip_info.filename = 'mod.py' - zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_info.date_time = cls.ref_time.timetuple() zip_egg.writestr(zip_info, 'x = 3\n') zip_info = zipfile.ZipInfo() zip_info.filename = 'data.dat' - zip_info.date_time = 2013, 5, 12, 13, 25, 0 + zip_info.date_time = cls.ref_time.timetuple() zip_egg.writestr(zip_info, 'hello, world!') zip_egg.close() egg.close() @@ -55,11 +70,13 @@ manager = pkg_resources.ResourceManager() zp = pkg_resources.ZipProvider(mod) filename = zp.get_resource_filename(manager, 'data.dat') - assert os.stat(filename).st_mtime == 1368379500 + actual = datetime.datetime.fromtimestamp(os.stat(filename).st_mtime) + assert actual == self.ref_time f = open(filename, 'w') f.write('hello, world?') f.close() - os.utime(filename, (1368379500, 1368379500)) + ts = timestamp(self.ref_time) + os.utime(filename, (ts, ts)) filename = zp.get_resource_filename(manager, 'data.dat') f = open(filename) assert f.read() == 'hello, world!' -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de