This package contains a setuptools command for uploading Sphinx documentation to the Python Package Index (PyPI) at the dedicated URL packages.python.org.
The upload_sphinx command
upload_sphinx will create the necessary zip file out of an arbitrary documentation directory and posts it to the correct URL.
It’s also loosely based on Sphinx’ own setuptools command build_sphinx which allows to easily build documentation from the command line.
The upload_sphinx command has the following options:
--repository (-r): url of repository [default: http://pypi.python.org/pypi]
--show-response: display full response text from server
--upload-dir: directory to upload
Example
Assuming there is an Example package with Sphinx documentation to be uploaded to http://packages.python.org, with the following structure:
Example/ |-- example.py |-- setup.cfg |-- setup.py |-- docs | |-- build | | `-- html | |-- conf.py | |-- index.txt | `-- tips_tricks.txt
As with any other setuptools based command, you can define useful defaults in the setup.cfg of your Python package. The following snippet shows how to set the option defaults of the build_sphinx and upload_sphinx setup.py commands:
[build_sphinx] source-dir = docs/ build-dir = docs/build all_files = 1 [upload_sphinx] upload-dir = docs/build/html
To build and upload the Sphinx documentation you are now able to run:
$ python setup.py build_sphinx $ python setup.py upload_sphinx
Alternatively, you can of course just pass the appropriate options directly to the commands:
$ python setup.py build_sphinx --source-dir=docs/ --build-dir=docs/build --all-files $ python setup.y upload_sphinx --upload-dir=docs/build/html
Release files for testr3454 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| testr3454-0.1.1.tar.gz | 2.4 kB | Details |
Release files / testr3454-0.1.1.tar.gz
| Download URL | testr3454-0.1.1.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e371dd991651f6edb806f10c06a0e2f10a4eafb3496ec7774c75cbe50295c594
|
|
BLAKE2b-256 checksum How to use checksums |
7f3baffde7493b1d5db1aab08c5010c49294f50bc51be238e396dc3e93119ff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |