Any warnings produced by setup.py cause restview to give up
mehdisadeghi opened this issue · comments
Adding long_description_content_type
to setup
keyword arguments causes the following error:
python setup.py --long-description
Process returned error code 0.
/usr/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
This is my setup.py file.
You need a recent-enough setuptools version.
Anyway this has nothing to do with restview?
You need a recent-enough setuptools version.
I have setuptools 39.1.0 which is the latest version on PyPI.
Anyway this has nothing to do with restview?
I get this error when I run restview --long-description
.
Hm, I can reproduce:
- running
python setup.py --long-description
in a checkout of osmtogtfs works fine - running
restview --long-description
in the same directory fails
Curious.
Ah! python setup.py --long-description
always produces that warning on stderr, before printing the long_description to stdout. restview interprets any non-empty stderr output as an error. It shouldn't do that.
Quick workaround until I get this fixed:
restview -e 'python setup.py --long-description 2>/dev/null'
(and then you'll discover restview only handles ReStructuredText, and not Markdown.)
Thank you for bringing this problem to my attention! I've released restview 2.9.1 with the fix.
Unfortunately it won't be able to cope with your project: restview only supports ReStructuredText at the moment. Also, while testing I discovered that if your README gets (incorrectly) renderted as ReStructuredText, the automatic linkification of http://localhost:3000
in --pypi-strict mode makes the HTML cleaner used by PyPI reject the rendered HTML entirely.
Thank you for bringing this problem to my attention!
You're welcome! Thanks for the quick fix.
Unfortunately it won't be able to cope with your project: restview only supports ReStructuredText at the moment.
True. Actually I had another project with ReStructuredText that restview worked fine on it, then I mistakenly tried restview with the other one which uses Markdown and so we discovered the error... 😉