diff options
author | Daniel Holth <dholth@fastmail.fm> | 2014-11-12 20:48:39 -0500 |
---|---|---|
committer | Daniel Holth <dholth@fastmail.fm> | 2014-11-12 20:48:39 -0500 |
commit | 6953c419b5cda0a9fcac6041bbcc39937a221d13 (patch) | |
tree | 2873469a7f4c6d60be9c7fbe5f013ecffafec0bb | |
parent | 2ad1b48388b6000c051faee76e5441604352588e (diff) | |
parent | d36c9e053efb76103cc0ed771b8f75bef833f3ad (diff) | |
download | wheel-6953c419b5cda0a9fcac6041bbcc39937a221d13.tar.gz |
merge
-rw-r--r-- | setup.py | 2 | ||||
-rw-r--r-- | wheel/__init__.py | 2 | ||||
-rw-r--r-- | wheel/pep425tags.py | 5 | ||||
-rw-r--r-- | wscript | 26 |
4 files changed, 17 insertions, 18 deletions
@@ -28,7 +28,7 @@ setup(name='wheel', ], author='Daniel Holth', author_email='dholth@fastmail.fm', - url='http://bitbucket.org/pypa/wheel/', + url='https://bitbucket.org/pypa/wheel/', keywords=['wheel', 'packaging'], license='MIT', packages=[ diff --git a/wheel/__init__.py b/wheel/__init__.py index 11c7a39..b84d0e4 100644 --- a/wheel/__init__.py +++ b/wheel/__init__.py @@ -1,2 +1,2 @@ # __variables__ with double-quoted values will be available in setup.py: -__version__ = "0.24.0" +__version__ = "0.25.0" diff --git a/wheel/pep425tags.py b/wheel/pep425tags.py index 3af04a1..a6220ea 100644 --- a/wheel/pep425tags.py +++ b/wheel/pep425tags.py @@ -85,7 +85,10 @@ def get_supported(versions=None): # Tagged specifically as being cross-version compatible # (with just the major version specified) supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any')) - + + # Major Python version + platform; e.g. binaries not using the Python API + supported.append(('py%s' % (versions[0][0]), 'none', arch)) + # No abi / arch, generic Python for i, version in enumerate(versions): supported.append(('py%s' % (version,), 'none', 'any')) @@ -12,14 +12,15 @@ def options(opt): def configure(ctx): ctx.load('python') + ctx.check_python_version() def build(bld): - bld(features='py', - source=bld.path.ant_glob('wheel/**/*.py', excl="wheel/test"), + bld(features='py', + source=bld.path.ant_glob('wheel/**/*.py', excl="wheel/test"), install_from='.') # build the wheel: - + DIST_INFO = '%s-%s.dist-info' % (APPNAME, VERSION) node = bld.path.get_bld().make_node(DIST_INFO) @@ -33,7 +34,7 @@ def build(bld): CHANGES = codecs.open('CHANGES.txt', encoding='utf8').read() METADATA = codecs.open('METADATA.in', encoding='utf8').read() METADATA = string.Template(METADATA).substitute( - VERSION=VERSION, + VERSION=VERSION, DESCRIPTION='\n\n'.join((README, CHANGES)) ) @@ -52,10 +53,11 @@ Tag: py3-none-any bld(target=wheel, rule=lambda tsk: Utils.writef(tsk.outputs[0].abspath(), WHEEL)) - # globs don't work, since here the files may not exist + # globs don't work, since here the files may not exist: bld.install_files('${PYTHONDIR}/'+DIST_INFO, [DIST_INFO+'/WHEEL', DIST_INFO+'/METADATA']) - bld.install_files('${PYTHONDIR}/'+DIST_INFO, ['entry_points.txt']) + # only if entry_points.txt exists: + bld.install_files('${PYTHONDIR}/'+DIST_INFO, ['entry_points.txt']) import shutil, os, base64 @@ -73,11 +75,12 @@ class WheelDist(Scripting.Dist): files = self.get_files() lines = [] for f in files: + print("File: %s" % f.relpath()) size = os.stat(f.abspath()).st_size digest = hashlib.sha256(open(f.abspath(), 'rb').read()).digest() - digest = "sha256="+urlsafe_b64encode(digest) + digest = "sha256="+(urlsafe_b64encode(digest).decode('ascii')) lines.append("%s,%s,%s" % (f.path_from(self.base_path).replace(',', ',,'), digest, size)) - + record_path = '%s-%s.dist-info/RECORD' % (APPNAME, VERSION) lines.append(record_path+',,') RECORD = '\n'.join(lines) @@ -128,10 +131,3 @@ class package_cls(Build.InstallContext): shutil.rmtree(self.tmp.abspath()) -# for variants, add command subclasses "package_release", "package_debug", etc -def init(ctx): - for x in ('release', 'debug'): - class tmp(package_cls): - cmd = 'package_' + x - variant = x - |