Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show long description in setup.py in readable format #136

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

zmiklank
Copy link
Collaborator

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.

@zmiklank
Copy link
Collaborator Author

@praiskup can I merge? As I am no python expert I rather ask, because they may exist better solution on how to write this.

@praiskup
Copy link
Member

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'
)

@zmiklank
Copy link
Collaborator Author

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.

@praiskup
Copy link
Member

Then +1 for merging? We can fix it later.

@praiskup praiskup merged commit 3dfd323 into devexp-db:main Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants