Commits

Daniel Holth  committed ad75f74

implement description-in-payload

  • Participants
  • Parent commits 9d21381

Comments (0)

Files changed (3)

-
 Wheel
 =====
 
     signature_reqs.append('dirspec')
 
 setup(name='wheel',
-      version='0.13.0',
+      version='0.14.0',
       description='A built-package format for Python.',
       long_description=README + '\n\n' +  CHANGES,
       classifiers=[

File wheel/bdist_wheel.py

 import hashlib
 import os
 import subprocess
+import textwrap
 import warnings
 
 try:
                     spec = self._to_requires_dist(parsed_requirement)
                     pkg_info['Requires-Dist'] = parsed_requirement.key + \
                         spec + condition
+        description = pkg_info['Description']
+        if description:
+            del pkg_info['Description']
+            description_lines = description.splitlines()
+            description_dedent = '\n'.join(
+                    # if the first line of long_description is blank,
+                    # the first line here will be indented.
+                    (description_lines[0].lstrip(),
+                     textwrap.dedent('\n'.join(description_lines[1:])),
+                     '\n'))
+            pkg_info.set_payload(description_dedent)
         return pkg_info
     
     def setupcfg_requirements(self):