Supporting README.md

285 views
Skip to first unread message

Ian Lee

unread,
Feb 1, 2016, 11:01:54 PM2/1/16
to pypa-dev
Posting to the general list, because I'm not sure if this is more of a pip, setuptools, or some other component issue. I was just running `python setup.py sdist` for a project I'm contributing too, and caught this notice in the output:

warning: sdist: standard file not found: should have one of README, README.rst, README.txt

This particular project is using README.md as their README format, which is pretty popular in some circles, such as GitHub. My question is, how hard would it be to add support for README.md to setuptools (?) to automatically include? I'd be happy to contribute to the fix, if someone can point me to which repo is where this would live.

As a related note, this made me notice that it appears Markdown formatting is not supported in PyPI package information? I assume the two issues are related. Any advice on how difficult this might be to update?

Cheers,

Ian

anatoly techtonik

unread,
Feb 25, 2016, 4:19:19 AM2/25/16
to pypa-dev
On Tuesday, February 2, 2016 at 7:01:54 AM UTC+3, Ian Lee wrote:
Posting to the general list, because I'm not sure if this is more of a pip, setuptools, or some other component issue. I was just running `python setup.py sdist` for a project I'm contributing too, and caught this notice in the output:

warning: sdist: standard file not found: should have one of README, README.rst, README.txt

This particular project is using README.md as their README format, which is pretty popular in some circles, such as GitHub. My question is, how hard would it be to add support for README.md to setuptools (?) to automatically include? I'd be happy to contribute to the fix, if someone can point me to which repo is where this would live.

The problem is distutils, which is frozen in Python stdlib.
setuptools could support it, but does not, because there is no way to specify the format of long_description field - filename is not preserved and you can't reference filename with description inside of sdist archive to figure out format by extension.
reST parser may choke on markdown.
 
As a related note, this made me notice that it appears Markdown formatting is not supported in PyPI package information? I assume the two issues are related. Any advice on how difficult this might be to update?

It is difficult, because of bus factor - there are no people trustful enough to maintain PyPI and keep everyone else sure that PyPI won't be broken by them.

Ian Cordasco

unread,
Feb 25, 2016, 9:27:52 AM2/25/16
to anatoly techtonik, pypa-dev
On Thu, Feb 25, 2016 at 3:19 AM, anatoly techtonik <tech...@gmail.com> wrote:
> The problem is distutils, which is frozen in Python stdlib.
> setuptools could support it, but does not, because there is no way to
> specify the format of long_description field - filename is not preserved and
> you can't reference filename with description inside of sdist archive to
> figure out format by extension.
> reST parser may choke on markdown.

Right, but there have been otherwise productive discussions on what
could be done to support this via metadata and via Warehouse (aka PyPI
2.0)

>> As a related note, this made me notice that it appears Markdown formatting
>> is not supported in PyPI package information? I assume the two issues are
>> related. Any advice on how difficult this might be to update?
>
>
> It is difficult, because of bus factor - there are no people trustful enough
> to maintain PyPI and keep everyone else sure that PyPI won't be broken by
> them.
> https://bitbucket.org/pypa/pypi/issues/148/support-markdown-for-readmes

The reality is that PyPI is presently an old and fragile code-base.
All new features are being asked to target Warehouse (PyPI 2.0) which
may or may not be included in the "Become PyPI" milestone. This has
nothing to do with people being trustworthy, it has to do with
justified caution around modifying something used by an incredibly
large number of people. When a system is that fragile but also that
necessary for other people's work flows you get to the point where you
accept that changing it is more of a risk than replacing it with
something more maintainable that is backwards compatible of sorts.

tl;dr, Ian you may want to look at https://github.com/pypa/warehouse/issues/869

R. David Murray

unread,
Feb 25, 2016, 12:46:56 PM2/25/16
to pypa-dev
On Thu, 25 Feb 2016 08:27:51 -0600, Ian Cordasco <graffatc...@gmail.com> wrote:
> On Thu, Feb 25, 2016 at 3:19 AM, anatoly techtonik <tech...@gmail.com> wrote:
> > The problem is distutils, which is frozen in Python stdlib.
> > setuptools could support it, but does not, because there is no way to
> > specify the format of long_description field - filename is not preserved and
> > you can't reference filename with description inside of sdist archive to
> > figure out format by extension.
> > reST parser may choke on markdown.
>
> Right, but there have been otherwise productive discussions on what
> could be done to support this via metadata and via Warehouse (aka PyPI
> 2.0)

Note that distutils in the stdlib is *not* frozen any more. However,
changes to it are still considered risky, and there seem to be few
to zero people willing to review proposed patches.

--David
Reply all
Reply to author
Forward
0 new messages