Giter VIP home page Giter VIP logo

sphinx-pypi-upload's Introduction

https://travis-ci.org/WoLpH/sphinx-pypi-upload.svg?branch=master

Uploading of documentation to PyPI has been `disabled`_, so this package cannot be used with PyPI itself anymore.

Sphinx-PyPI-upload

This package contains a setuptools command for uploading Sphinx documentation to the Python Package Index (PyPI) at the dedicated URL packages.python.org. It was forked from the similarly named script from Jannis Leidel.

Homepage: https://github.com/WoLpH/sphinx-pypi-upload

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

sphinx-pypi-upload's People

Contributors

johnyf avatar simonsapin avatar wolph avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

sphinx-pypi-upload's Issues

error: no files found in upload directory, when directory is full of files

In a circleci project I am using your library in the following way:
After I have built the documentation manually I have saved all html files in a certain directory.
Afterwards i copy all these files to a folder called upload_dir where the files are all under html.
Wanting to utilise on the upload_sphinx part of your package I get the following error which seems really strange:

running upload_sphinx
error: no files found in upload directory '/home/circleci/project/upload_dir/html'

whereas I can see that this file exists.
To understand the error based on its commands, you can see the script that is being executed and its behavior inside the travis environment.

Thanks in advance for your time!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.