Skip to content

Commit

Permalink
ci: Set proper content-type for long_desc in setupgen
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jun 9, 2022
1 parent 63ea1b8 commit e55f8a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/pants-plugins/setupgen/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,13 @@ async def setup_kwargs_plugin(request: CustomSetupKwargsRequest) -> SetupKwargs:
spec_path = Path(request.target.address.spec_path)
if (spec_path / "README.md").is_file():
readme_path = spec_path / "README.md"
long_description_content_type = "text/markdown"
elif (spec_path / "README.rst").is_file():
readme_path = spec_path / "README.rst"
long_description_content_type = "text/x-rst"
else:
readme_path = spec_path / "README"
long_description_content_type = "text/plain"
_digest_contents = await Get(
DigestContents,
PathGlobs(
Expand All @@ -102,7 +105,7 @@ async def setup_kwargs_plugin(request: CustomSetupKwargsRequest) -> SetupKwargs:
hardcoded_kwargs = dict(
version=VERSION,
long_description=long_description,
long_description_content_type="text/markdown",
long_description_content_type=long_description_content_type,
url="https://github.com/lablup/backend.ai",
project_urls={
"Documentation": "https://docs.backend.ai/",
Expand Down

0 comments on commit e55f8a6

Please sign in to comment.