diff --git a/poetry/masonry/builders/sdist.py b/poetry/masonry/builders/sdist.py index c906f4c473d..a4f1b3eecf7 100644 --- a/poetry/masonry/builders/sdist.py +++ b/poetry/masonry/builders/sdist.py @@ -30,6 +30,7 @@ 'version': {version!r}, 'description': {description!r}, 'long_description': {long_description!r}, + 'long_description_content_type': {long_description_content_type!r}, 'author': {author!r}, 'author_email': {author_email!r}, 'maintainer': {maintainer!r}, @@ -185,6 +186,9 @@ def build_setup(self): # type: () -> bytes version=to_str(self._meta.version), description=to_str(self._meta.summary), long_description=to_str(self._meta.description), + long_description_content_type=to_str( + self._meta.description_content_type + ), author=to_str(self._meta.author), author_email=to_str(self._meta.author_email), maintainer=to_str(self._meta.maintainer), diff --git a/tests/masonry/builders/test_sdist.py b/tests/masonry/builders/test_sdist.py index 670289f9fb0..fa4002a8138 100644 --- a/tests/masonry/builders/test_sdist.py +++ b/tests/masonry/builders/test_sdist.py @@ -126,6 +126,7 @@ def test_make_setup(): "my_package.sub_pkg2", "my_package.sub_pkg3", ] + assert ns["setup_kwargs"]["long_description_content_type"] == "text/x-rst" assert ns["install_requires"] == ["cachy[msgpack]>=0.2.0,<0.3.0", "cleo>=0.6,<0.7"] assert ns["entry_points"] == { "console_scripts": [