Closed zmiklank closed 1 year ago
@praiskup can I merge? As I am no python expert I rather ask, because they may exist better solution on how to write this.
So far I haven't a chance to deal with similar problem IIRC, but I found https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/ What do you think about the suggestion:
from setuptools import setup
# read the contents of your README file
from pathlib import Path
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").read_text()
setup(
name='an_example_package',
# other arguments omitted
long_description=long_description,
long_description_content_type='text/markdown'
)
Thanks Pavel for looking into this. However, I see one possible issue with this approach. In current approach we remove the badges info from README, as badges are not written in a proper markdown and would be showed incorrectly in PyPI. The code you mentioned here imo does not deal with this situation.
Then +1 for merging? We can fix it later.
Seems like pypi description needs fix up: https://pypi.org/project/distgen/
This PR introduces readable form of README.md for a long_description field in setup.py.