Commits

Daniel Holth committed 593ec65

rename Packager to Generator in WHEEL; use Metadata 1.3

Comments (0)

Files changed (4)

 -------------
 
 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.
 
 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.
 
     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 "
             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)
     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')

wheel/wininst2wheel.py

     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)