Skip to main content

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 Sphinx-PyPI-upload3 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Sphinx-PyPI-upload3 0.2.2
File Size Uploaded
Sphinx-PyPI-upload3-0.2.2.zip 8.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Sphinx-PyPI-upload3 0.2.2
File Interpreter ABI Platform
Sphinx-PyPI-upload3-0.2.2.win32.exe Details

Total release size: 206.5 kB

Release files / Sphinx-PyPI-upload3-0.2.2.zip

Download URL Sphinx-PyPI-upload3-0.2.2.zip
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
414dc4c429ac5236692397083cd023b97e8dd3a5b5020b3c66450f09f21fd4a6
BLAKE2b-256 checksum
How to use checksums
dc74a890fc80a2f55d2fbba02faf4ffb2d16aca781cc0e597890b758027f1460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Sphinx-PyPI-upload3-0.2.2.win32.exe

Download URL Sphinx-PyPI-upload3-0.2.2.win32.exe
Size 198.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fb627dcedb708821aaf63eabcc1697f54904d8081d39c1dd8c1ad1689c3bf2b7
BLAKE2b-256 checksum
How to use checksums
b544a865664f8e15ed51cf432ea834797967ac7bb7925a7262dd23bc8b21f306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page