Daniel Holth committed ad75f74

implement description-in-payload

Comments (0)

Files changed (3)

-      version='0.13.0',
+      version='0.14.0',
       description='A built-package format for Python.',
       long_description=README + '\n\n' +  CHANGES,


 import hashlib
 import os
 import subprocess
+import textwrap
 import warnings
                     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):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.