GeospatialPython / pyshp

This library reads and writes ESRI Shapefiles in pure Python.
MIT License
1.1k stars 259 forks source link

Auto converting setup description to be PyPI readable #170

Closed karimbahgat closed 5 years ago

karimbahgat commented 5 years ago

In the past, the PyPI description, contained and extracted from README.md, was manually edited and converted from Markdown to ReStructuredText (since PyPI only renders RST). With the newly overhauled PyPI website, the description cannot be manually edited. Until PyPI gets around to supporting Markdown, we must therefore find a way to automatically do this conversion when defining the 'description' arg in the setup.py script. Not sure what would be best here, but one easy way could be to have the setup.py script automatically convert to RST using the iPandoc wrapper for the docverter.com online service API. And to only require this for actual deployment.

micahcochran commented 5 years ago

since PyPI only renders RST

Fairly recently added support for Markdown.

karimbahgat commented 5 years ago

So they finally added it, great. Oddly enough, the newest released bugfix version 2.0.1 included the recommended content type (see 92f275b65b0efcf3048e92d53fa911575c5f509d), but PyPI still isn't rendering the markdown. Github is rendering it alright, but maybe there's a tiny formatting error that PyPI can't handle.

micahcochran commented 5 years ago

Have you upgraded setuptools recently?
version 38.6.0 or better is required.

karimbahgat commented 5 years ago

That could possibly be it. But deployment to pypi is done automatically via Travis CI, so not sure how that works. I guess that depends what version setuptools Travis uses? Do you know how to check or change that?

micahcochran commented 5 years ago

To check the setuptools version in .travis.yml: pip list | grep setuptools

If you want to install a newer version of setuptools in .travis.yml: pip install -U setuptools>=38.6.0

karimbahgat commented 5 years ago

Great, thanks! Trying it out for the next release.

karimbahgat commented 5 years ago

Looks like it worked, now rendering correctly on PyPI. Thanks again!