diff options
| author | Daniel Holth <dholth@fastmail.fm> | 2012-09-15 08:05:11 -0400 |
|---|---|---|
| committer | Daniel Holth <dholth@fastmail.fm> | 2012-09-15 08:05:11 -0400 |
| commit | 91678ce3379e2243ad51545d2e46be3cc0f2e310 (patch) | |
| tree | d24334d92a1abfb708e2308322ec32a6207684a6 | |
| parent | 90d7dbfe32f3251dccc578697a7c062fd1f37d9c (diff) | |
| download | wheel-git-91678ce3379e2243ad51545d2e46be3cc0f2e310.tar.gz | |
rename Packager to Generator in WHEEL; use Metadata 1.3
| -rw-r--r-- | docs/index.rst | 14 | ||||
| -rw-r--r-- | wheel/bdist_wheel.py | 6 | ||||
| -rwxr-xr-x | wheel/egg2wheel.py | 2 | ||||
| -rwxr-xr-x | wheel/wininst2wheel.py | 2 |
4 files changed, 15 insertions, 9 deletions
diff --git a/docs/index.rst b/docs/index.rst index bbdc896..20466f3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -69,8 +69,8 @@ File Contents ------------- Wheel files contain a folder `{distribution}-{version}.dist-info/` with -the PEP 376 metadata and an additional file `WHEEL` with metadata about -the package itself. +the PEP 426 metadata (metadata version 1.3 or greater) and an additional +file `WHEEL` with metadata about the archive itself. The root of a .whl is either purelib or platlib. @@ -81,10 +81,16 @@ other files that are not installed on sys.path, they are found in Wheel files contain metadata about the wheel format itself in `{distribution}-{version}/WHEEL` :: - Wheel-Version: 0.9 - Packager: bdist_wheel + Wheel-Version: 0.1 + Generator: bdist_wheel 0.7 Root-Is-Purelib: true +``Wheel-Version`` is the version number of the Wheel +specification. ``Generator`` is the name and optionally the version of +the software that produced the archive. ``Root-Is-Purelib`` is ``true`` +if the top level directory of the archive should be installed into +``purelib``; otherwise the root should be installed into platlib. + A wheel installer should warn if `Wheel-Version` is greater than the version it supports, and fail if `Wheel-Version` has a greater major version than the version it supports. diff --git a/wheel/bdist_wheel.py b/wheel/bdist_wheel.py index 2866fc2..4ae0185 100644 --- a/wheel/bdist_wheel.py +++ b/wheel/bdist_wheel.py @@ -53,7 +53,7 @@ class bdist_wheel(Command): description = 'create a wheel distribution' - user_options = [('bdist-dir=', 'd', + user_options = [('bdist-dir=', 'b', "temporary directory for creating the distribution"), ('plat-name=', 'p', "platform name to embed in generated filenames " @@ -220,11 +220,11 @@ class bdist_wheel(Command): else: rmtree(self.bdist_dir) - def write_wheelfile(self, wheelfile_base, packager='bdist_wheel'): + def write_wheelfile(self, wheelfile_base, generator='bdist_wheel'): from email.message import Message msg = Message() msg['Wheel-Version'] = '0.1' # of the spec - msg['Packager'] = packager + msg['Generator'] = generator msg['Root-Is-Purelib'] = str(self.root_is_purelib).lower() wheelfile_path = os.path.join(wheelfile_base, 'WHEEL') logger.info('creating %s', wheelfile_path) diff --git a/wheel/egg2wheel.py b/wheel/egg2wheel.py index 3fd900c..8a44cef 100755 --- a/wheel/egg2wheel.py +++ b/wheel/egg2wheel.py @@ -36,7 +36,7 @@ def main(): dist_info_dir = os.path.join(dir, '%s.dist-info' % dist_info) bw.egg2dist(os.path.join(dir, 'EGG-INFO'), dist_info_dir) - bw.write_wheelfile(dist_info_dir, packager='egg2wheel') + bw.write_wheelfile(dist_info_dir, generator='egg2wheel') bw.write_record(dir, dist_info_dir) filename = make_archive(wheel_name, 'zip', root_dir=dir) os.rename(filename, filename[:-3] + 'whl') diff --git a/wheel/wininst2wheel.py b/wheel/wininst2wheel.py index f7d5abf..fdb6b8a 100755 --- a/wheel/wininst2wheel.py +++ b/wheel/wininst2wheel.py @@ -142,7 +142,7 @@ def bdist_wininst2wheel(path): bw.root_is_purelib = root_is_purelib dist_info_dir = os.path.join(dir, '%s.dist-info' % dist_info) bw.egg2dist(os.path.join(dir, egginfo_name), dist_info_dir) - bw.write_wheelfile(dist_info_dir, packager='egg2wheel') + bw.write_wheelfile(dist_info_dir, generator='egg2wheel') bw.write_record(dir, dist_info_dir) archive_wheelfile(wheel_name, dir) |
