Hello community, here is the log from the commit of package python-wheel for openSUSE:Factory checked in at 2013-09-23 10:59:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-wheel (Old) and /work/SRC/openSUSE:Factory/.python-wheel.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-wheel" Changes: -------- --- /work/SRC/openSUSE:Factory/python-wheel/python-wheel.changes 2013-09-11 13:08:26.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-wheel.new/python-wheel.changes 2013-09-23 11:17:55.000000000 +0200 @@ -1,0 +2,9 @@ +Tue Sep 17 08:42:34 UTC 2013 - [email protected] + +- update to 0.22.0: +- Include entry_points.txt, scripts a.k.a. commands, in experimental + pydist.json +- Improved test_requires parsing +- Python 2.6 fixes, "wheel version" command courtesy pombredanne + +------------------------------------------------------------------- Old: ---- wheel-0.21.0.tar.gz New: ---- wheel-0.22.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-wheel.spec ++++++ --- /var/tmp/diff_new_pack.5Pwq2V/_old 2013-09-23 11:17:56.000000000 +0200 +++ /var/tmp/diff_new_pack.5Pwq2V/_new 2013-09-23 11:17:56.000000000 +0200 @@ -13,24 +13,25 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Name: python-wheel -Version: 0.21.0 +Version: 0.22.0 Release: 0 -License: MIT Summary: A built-package format for Python -Url: http://bitbucket.org/dholth/wheel/ +License: MIT Group: Development/Languages/Python +Url: http://bitbucket.org/dholth/wheel/ Source: https://pypi.python.org/packages/source/w/wheel/wheel-%{version}.tar.gz BuildRequires: python-devel BuildRequires: python-setuptools # Test requirements: BuildRequires: python-argparse +BuildRequires: python-cov-core >= 1.6 +BuildRequires: python-coverage BuildRequires: python-jsonschema BuildRequires: python-pytest -BuildRequires: python-coverage -BuildRequires: python-cov-core >= 1.6 BuildRequires: python-pytest-cov Recommends: python-ed25519ll Recommends: python-dirspec ++++++ wheel-0.21.0.tar.gz -> wheel-0.22.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/CHANGES.txt new/wheel-0.22.0/CHANGES.txt --- old/wheel-0.21.0/CHANGES.txt 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/CHANGES.txt 2013-09-16 00:08:51.000000000 +0200 @@ -1,3 +1,10 @@ +0.22.0 +====== +- Include entry_points.txt, scripts a.k.a. commands, in experimental + pydist.json +- Improved test_requires parsing +- Python 2.6 fixes, "wheel version" command courtesy pombredanne + 0.21.0 ====== - Pregenerated scripts are the default again. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/PKG-INFO new/wheel-0.22.0/PKG-INFO --- old/wheel-0.21.0/PKG-INFO 2013-07-20 18:20:54.000000000 +0200 +++ new/wheel-0.22.0/PKG-INFO 2013-09-16 00:09:16.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: wheel -Version: 0.21.0 +Version: 0.22.0 Summary: A built-package format for Python. Home-page: http://bitbucket.org/dholth/wheel/ Author: Daniel Holth @@ -20,34 +20,41 @@ final locations) at any later time. The wheel project provides a `bdist_wheel` command for setuptools - (requires distribute >= 0.6.34). Wheel files can be - installed with a newer `pip` from https://github.com/pypa/pip - or with wheel's own command line utility. - - The wheel documentation is at http://wheel.rtfd.org/. The - file format is documented in PEP 427 - (http://www.python.org/dev/peps/pep-0427/). + (requires setuptools >= 0.8.0). Wheel files can be installed with a + newer `pip` from https://github.com/pypa/pip or with wheel's own command + line utility. + + The wheel documentation is at http://wheel.rtfd.org/. The file format + is documented in PEP 427 (http://www.python.org/dev/peps/pep-0427/). The reference implementation is at http://bitbucket.org/dholth/wheel/ Why not egg? ------------ - Python's egg format predates the packaging related standards we have today, - the most important being PEP 376 "Database of Installed Python Distributions" - which specifies the .dist-info directory (instead of .egg-info) and PEP 345 - "Metadata for Python Software Packages 1.2" which specifies how to express - dependencies (instead of requires.txt in .egg-info). + Python's egg format predates the packaging related standards we have + today, the most important being PEP 376 "Database of Installed Python + Distributions" which specifies the .dist-info directory (instead of + .egg-info) and PEP 426 "Metadata for Python Software Packages 2.0" + which specifies how to express dependencies (instead of requires.txt + in .egg-info). Wheel implements these things. It also provides a richer file naming - convention that communicates the Python implementation and ABI as well as - simply the language version used in a particular package. + convention that communicates the Python implementation and ABI as well + as simply the language version used in a particular package. + + Unlike .egg, wheel will be a fully-documented standard at the binary + level that is truly easy to install even if you do not want to use the + reference implementation. - Unlike .egg, wheel will be a fully-documented standard at the binary level - that is truly easy to install even if you do not want to use the reference - implementation. + 0.22.0 + ====== + - Include entry_points.txt, scripts a.k.a. commands, in experimental + pydist.json + - Improved test_requires parsing + - Python 2.6 fixes, "wheel version" command courtesy pombredanne 0.21.0 ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/README.txt new/wheel-0.22.0/README.txt --- old/wheel-0.21.0/README.txt 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/README.txt 2013-09-16 00:08:51.000000000 +0200 @@ -12,30 +12,30 @@ final locations) at any later time. The wheel project provides a `bdist_wheel` command for setuptools -(requires distribute >= 0.6.34). Wheel files can be -installed with a newer `pip` from https://github.com/pypa/pip -or with wheel's own command line utility. - -The wheel documentation is at http://wheel.rtfd.org/. The -file format is documented in PEP 427 -(http://www.python.org/dev/peps/pep-0427/). +(requires setuptools >= 0.8.0). Wheel files can be installed with a +newer `pip` from https://github.com/pypa/pip or with wheel's own command +line utility. + +The wheel documentation is at http://wheel.rtfd.org/. The file format +is documented in PEP 427 (http://www.python.org/dev/peps/pep-0427/). The reference implementation is at http://bitbucket.org/dholth/wheel/ Why not egg? ------------ -Python's egg format predates the packaging related standards we have today, -the most important being PEP 376 "Database of Installed Python Distributions" -which specifies the .dist-info directory (instead of .egg-info) and PEP 345 -"Metadata for Python Software Packages 1.2" which specifies how to express -dependencies (instead of requires.txt in .egg-info). +Python's egg format predates the packaging related standards we have +today, the most important being PEP 376 "Database of Installed Python +Distributions" which specifies the .dist-info directory (instead of +.egg-info) and PEP 426 "Metadata for Python Software Packages 2.0" +which specifies how to express dependencies (instead of requires.txt +in .egg-info). Wheel implements these things. It also provides a richer file naming -convention that communicates the Python implementation and ABI as well as -simply the language version used in a particular package. +convention that communicates the Python implementation and ABI as well +as simply the language version used in a particular package. -Unlike .egg, wheel will be a fully-documented standard at the binary level -that is truly easy to install even if you do not want to use the reference -implementation. +Unlike .egg, wheel will be a fully-documented standard at the binary +level that is truly easy to install even if you do not want to use the +reference implementation. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/__init__.py new/wheel-0.22.0/wheel/__init__.py --- old/wheel-0.21.0/wheel/__init__.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/__init__.py 2013-09-16 00:08:51.000000000 +0200 @@ -1,2 +1,2 @@ # __variables__ with double-quoted values will be available in setup.py: -__version__ = "0.21.0" +__version__ = "0.22.0" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/bdist_wheel.py new/wheel-0.22.0/wheel/bdist_wheel.py --- old/wheel-0.21.0/wheel/bdist_wheel.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/bdist_wheel.py 2013-09-16 00:08:51.000000000 +0200 @@ -432,7 +432,8 @@ hash = '' size = '' else: - data = open(path, 'rb').read() + with open(path, 'rb') as f: + data = f.read() digest = hashlib.sha256(data).digest() hash = 'sha256=' + native(urlsafe_b64encode(digest)) size = len(data) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/egg2wheel.py new/wheel-0.22.0/wheel/egg2wheel.py --- old/wheel-0.21.0/wheel/egg2wheel.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/egg2wheel.py 2013-09-16 00:08:51.000000000 +0200 @@ -53,7 +53,7 @@ for pat in args.eggs: for egg in iglob(pat): if args.verbose: - sys.stdout.write("{}... ".format(egg)) + sys.stdout.write("{0}... ".format(egg)) egg2wheel(egg, args.dest_dir) if args.verbose: sys.stdout.write("OK\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/install.py new/wheel-0.22.0/wheel/install.py --- old/wheel-0.21.0/wheel/install.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/install.py 2013-09-16 00:08:51.000000000 +0200 @@ -182,7 +182,7 @@ def __lt__(self, other): if self.context != other.context: - raise TypeError("{}.context != {}.context".format(self, other)) + raise TypeError("{0}.context != {1}.context".format(self, other)) return self._sort_key < other._sort_key @@ -198,7 +198,7 @@ return sv < ov # Compatibility if self.context != other.context: - raise TypeError("{}.context != {}.context".format(self, other)) + raise TypeError("{0}.context != {1}.context".format(self, other)) sc = self.rank oc = other.rank if sc != None and oc != None and sc != oc: @@ -295,7 +295,7 @@ # Data file. Target destination is elsewhere key, sep, filename = filename.partition('/') if not sep: - raise ValueError("Invalid filename in wheel: {}".format(name)) + raise ValueError("Invalid filename in wheel: {0}".format(name)) target = get_path(key) else: # Normal file. Target destination is root @@ -323,7 +323,7 @@ k = info.filename key, target, filename, dest = v if os.path.exists(dest): - raise ValueError("Wheel file {} would overwrite {}. Use force if this is intended".format(k, dest)) + raise ValueError("Wheel file {0} would overwrite {1}. Use force if this is intended".format(k, dest)) # Get the name of our executable, for use when replacing script # wrapper hashbang lines. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/metadata.py new/wheel-0.22.0/wheel/metadata.py --- old/wheel-0.21.0/wheel/metadata.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/metadata.py 2013-09-16 00:08:51.000000000 +0200 @@ -6,7 +6,7 @@ from .pkginfo import read_pkg_info import re -import os +import os.path import textwrap import pkg_resources import email.parser @@ -66,7 +66,7 @@ package = value key = MayRequiresKey(condition, extra) may_requires[key].append(package) - + if may_requires: metadata['run_requires'] = [] for key, value in may_requires.items(): @@ -76,7 +76,7 @@ if key.condition: may_requirement['environment'] = key.condition metadata['run_requires'].append(may_requirement) - + if not 'extras' in metadata: metadata['extras'] = [] metadata['extras'].extend([key.extra for key in may_requires.keys() if key.extra]) @@ -132,7 +132,7 @@ if low_key in PLURAL_FIELDS: metadata[PLURAL_FIELDS[low_key]] = pkg_info.get_all(key) - elif low_key == "requires_dist": + elif low_key == "requires_dist": handle_requires(metadata, pkg_info, key) elif low_key == 'provides_extra': @@ -156,8 +156,9 @@ for requires, attr in (('test_requires', 'tests_require'),): try: requirements = getattr(distribution, attr) - if requirements: - metadata[requires] = [{'requires':requirements}] + if isinstance(requirements, list): + new_requirements = list(convert_requirements(requirements)) + metadata[requires] = [{'requires':new_requirements}] except AttributeError: pass @@ -174,8 +175,30 @@ if contacts: metadata['contacts'] = contacts - return metadata + # convert entry points to exports + try: + with open(os.path.join(os.path.dirname(path), "entry_points.txt"), "r") as ep_file: + ep_map = pkg_resources.EntryPoint.parse_map(ep_file.read()) + exports = {} + for group, items in ep_map.items(): + exports[group] = {} + for item in items.values(): + name, export = str(item).split(' = ', 1) + exports[group][name] = export + if exports: + metadata['exports'] = exports + except IOError: + pass + + # copy console_scripts entry points to commands + if 'exports' in metadata: + for (ep_script, wrap_script) in (('console_scripts', 'wrap_console'), + ('gui_scripts', 'wrap_gui')): + if ep_script in metadata['exports']: + metadata['commands'] = metadata.get('commands', {}) + metadata['commands'][wrap_script] = metadata['exports'][ep_script] + return metadata def requires_to_requires_dist(requirement): """Compose the version predicates for requirement in PEP 345 fashion.""" @@ -186,6 +209,15 @@ return '' return " (%s)" % ','.join(requires_dist) +def convert_requirements(requirements): + """Yield Requires-Dist: strings for parsed requirements strings.""" + for req in requirements: + parsed_requirement = pkg_resources.Requirement.parse(req) + spec = requires_to_requires_dist(parsed_requirement) + extras = ",".join(parsed_requirement.extras) + if extras: + extras = "[%s]" % extras + yield (parsed_requirement.project_name + extras + spec) def pkginfo_to_metadata(egg_info_path, pkginfo_path): """ @@ -202,16 +234,8 @@ if extra: pkg_info['Provides-Extra'] = extra condition = '; extra == %s' % repr(extra) - for req in reqs: - parsed_requirement = pkg_resources.Requirement.parse(req) - spec = requires_to_requires_dist(parsed_requirement) - extras = ",".join(parsed_requirement.extras) - if extras: - extras = "[%s]" % extras - pkg_info['Requires-Dist'] = (parsed_requirement.project_name - + extras - + spec - + condition) + for new_req in convert_requirements(reqs): + pkg_info['Requires-Dist'] = new_req + condition description = pkg_info['Description'] if description: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/signatures/keys.py new/wheel-0.22.0/wheel/signatures/keys.py --- old/wheel-0.21.0/wheel/signatures/keys.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/signatures/keys.py 2013-09-16 00:08:51.000000000 +0200 @@ -56,7 +56,7 @@ self.data['schema'] = self.SCHEMA elif self.data['schema'] != self.SCHEMA: raise ValueError( - "Bad wheel.json version {}, expected {}".format( + "Bad wheel.json version {0}, expected {1}".format( self.data['schema'], self.SCHEMA)) break return self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/test/complex-dist/setup.py new/wheel-0.22.0/wheel/test/complex-dist/setup.py --- old/wheel-0.21.0/wheel/test/complex-dist/setup.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/test/complex-dist/setup.py 2013-09-16 00:08:51.000000000 +0200 @@ -19,7 +19,7 @@ setup_requires=["wheel", "setuptools"], install_requires=["quux", "splort"], extras_require={'simple':['simple.dist']}, - tests_require=["foo", "bar"], + tests_require=["foo", "bar>=10.0.0"], entry_points={'console_scripts':['complex-dist=complexdist:main']} ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/tool/__init__.py new/wheel-0.22.0/wheel/tool/__init__.py --- old/wheel-0.21.0/wheel/tool/__init__.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/tool/__init__.py 2013-09-16 00:08:51.000000000 +0200 @@ -193,7 +193,7 @@ if wf.compatible or force: to_install.append(wf) else: - msg = ("{} is not compatible with this Python. " + msg = ("{0} is not compatible with this Python. " "--force to install anyway.".format(req)) raise WheelError(msg) else: @@ -218,7 +218,7 @@ for wf in to_install: if list_files: - sys.stdout.write(" {}\n".format(wf.filename)) + sys.stdout.write(" {0}\n".format(wf.filename)) continue wf.install(force=force) wf.zipfile.close() @@ -255,7 +255,7 @@ else: conv = bdist_wininst2wheel if verbose: - sys.stdout.write("{}... ".format(installer)) + sys.stdout.write("{0}... ".format(installer)) sys.stdout.flush() conv(installer, dest_dir) if verbose: @@ -334,6 +334,12 @@ convert_parser.add_argument('--verbose', '-v', action='store_true') convert_parser.set_defaults(func=convert_f) + def version_f(args): + from .. import __version__ + sys.stdout.write("wheel %s\n" % __version__) + version_parser = s.add_parser('version', help='Print version and exit') + version_parser.set_defaults(func=version_f) + def help_f(args): p.print_help() help_parser = s.add_parser('help', help='Show this help') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel/wininst2wheel.py new/wheel-0.22.0/wheel/wininst2wheel.py --- old/wheel-0.21.0/wheel/wininst2wheel.py 2013-07-20 18:20:04.000000000 +0200 +++ new/wheel-0.22.0/wheel/wininst2wheel.py 2013-09-16 00:08:51.000000000 +0200 @@ -178,7 +178,7 @@ for pat in args.installers: for installer in iglob(pat): if args.verbose: - sys.stdout.write("{}... ".format(installer)) + sys.stdout.write("{0}... ".format(installer)) bdist_wininst2wheel(installer, args.dest_dir) if args.verbose: sys.stdout.write("OK\n") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/wheel-0.21.0/wheel.egg-info/PKG-INFO new/wheel-0.22.0/wheel.egg-info/PKG-INFO --- old/wheel-0.21.0/wheel.egg-info/PKG-INFO 2013-07-20 18:20:53.000000000 +0200 +++ new/wheel-0.22.0/wheel.egg-info/PKG-INFO 2013-09-16 00:09:16.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: wheel -Version: 0.21.0 +Version: 0.22.0 Summary: A built-package format for Python. Home-page: http://bitbucket.org/dholth/wheel/ Author: Daniel Holth @@ -20,34 +20,41 @@ final locations) at any later time. The wheel project provides a `bdist_wheel` command for setuptools - (requires distribute >= 0.6.34). Wheel files can be - installed with a newer `pip` from https://github.com/pypa/pip - or with wheel's own command line utility. - - The wheel documentation is at http://wheel.rtfd.org/. The - file format is documented in PEP 427 - (http://www.python.org/dev/peps/pep-0427/). + (requires setuptools >= 0.8.0). Wheel files can be installed with a + newer `pip` from https://github.com/pypa/pip or with wheel's own command + line utility. + + The wheel documentation is at http://wheel.rtfd.org/. The file format + is documented in PEP 427 (http://www.python.org/dev/peps/pep-0427/). The reference implementation is at http://bitbucket.org/dholth/wheel/ Why not egg? ------------ - Python's egg format predates the packaging related standards we have today, - the most important being PEP 376 "Database of Installed Python Distributions" - which specifies the .dist-info directory (instead of .egg-info) and PEP 345 - "Metadata for Python Software Packages 1.2" which specifies how to express - dependencies (instead of requires.txt in .egg-info). + Python's egg format predates the packaging related standards we have + today, the most important being PEP 376 "Database of Installed Python + Distributions" which specifies the .dist-info directory (instead of + .egg-info) and PEP 426 "Metadata for Python Software Packages 2.0" + which specifies how to express dependencies (instead of requires.txt + in .egg-info). Wheel implements these things. It also provides a richer file naming - convention that communicates the Python implementation and ABI as well as - simply the language version used in a particular package. + convention that communicates the Python implementation and ABI as well + as simply the language version used in a particular package. + + Unlike .egg, wheel will be a fully-documented standard at the binary + level that is truly easy to install even if you do not want to use the + reference implementation. - Unlike .egg, wheel will be a fully-documented standard at the binary level - that is truly easy to install even if you do not want to use the reference - implementation. + 0.22.0 + ====== + - Include entry_points.txt, scripts a.k.a. commands, in experimental + pydist.json + - Improved test_requires parsing + - Python 2.6 fixes, "wheel version" command courtesy pombredanne 0.21.0 ====== -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
