Pregunta

You can upload documentation to run alongside a package on PyPI, but i was wondering if those docs could be hosted using WordPress. The requirements call for a recent copy of PHP and a MySQL database. Does the PyPI documentation system provide this?

¿Fue útil?

Solución

There's three kinds of documentation associated with a PyPI package.


First, there's the documentation on the package page itself.

This is just your long_description, parsed as ReStructured Text. So, that documentation cannot be served by WordPress.

I suppose you could indirectly pull it from a WordPress site if you set up the site to present a plain-text or RST version of your docs, and did something like this in your setup.py:

setup(
    # ...
    long_description = urllib.request.urlopen('http://example.com/path/to/mydocs').read()
)

… but I don't think you want to do that.


Next, you can add documentation at pythonhosted.org by uploading files from your package's pkg_edit page, or by using the upload_docs feature in distribute/setuptools.

This is just a tree full of static pages. So, that documentation cannot be served by WordPress.

However, again, you could use WordPress to generate this documentation, then pull it down and submit it to PyPI. And here, it seems less like a bad idea.


Finally, you can add a home page, which is a link to any site you want.

This can, of course, be a WordPress site.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top