aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/dist.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-09-03 13:33:20 -0400
committerJason R. Coombs <jaraco@jaraco.com>2017-09-03 13:33:20 -0400
commit45bc4b99137a4f7a627439239a193d89ff6cfee9 (patch)
treea3a2650f355e0a26ef8b04aa41e93aa0de0d4737 /setuptools/dist.py
parente5461b6ccc57596c7e9cf7837084f8a20eeec9b7 (diff)
parent09e14c771f8dfd08122c63dc7bc1027d0040c26e (diff)
downloadexternal_python_setuptools-45bc4b99137a4f7a627439239a193d89ff6cfee9.tar.gz
external_python_setuptools-45bc4b99137a4f7a627439239a193d89ff6cfee9.tar.bz2
external_python_setuptools-45bc4b99137a4f7a627439239a193d89ff6cfee9.zip
Merge branch 'master' into pr1127
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index e1510b6f..a2ca8795 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -58,6 +58,13 @@ def write_pkg_file(self, file):
if self.download_url:
file.write('Download-URL: %s\n' % self.download_url)
+ long_desc_content_type = getattr(
+ self,
+ 'long_description_content_type',
+ None
+ ) or 'UNKNOWN'
+ file.write('Description-Content-Type: %s\n' % long_desc_content_type)
+
long_desc = rfc822_escape(self.get_long_description())
file.write('Description: %s\n' % long_desc)
@@ -317,6 +324,9 @@ class Distribution(Distribution_parse_config_files, _Distribution):
self.dist_files = []
self.src_root = attrs and attrs.pop("src_root", None)
self.patch_missing_pkg_info(attrs)
+ self.long_description_content_type = _attrs_dict.get(
+ 'long_description_content_type'
+ )
# Make sure we have any eggs needed to interpret 'attrs'
if attrs is not None:
self.dependency_links = attrs.pop('dependency_links', [])