The Sphinx documentation generator
Go to file
Michał Górny 14af6b429e Use ensuredir() instead of os.makedirs() to fix race conditions
Use the ensuredir() function consistently across Sphinx code to avoid
race conditions e.g. when multiple Sphinx instances attempt to create
the same output directory. The ensuredir() function that was already
present in sphinx.util.osutil correctly catches EEXIST exception that
occurs if the specified directory already exists (i.e. it was created
between the call to os.path.isdir() and os.makedirs() that follows it).

While at it, remove redundant os.path.isdir() calls when they only
guarded the os.makedirs() call, and replace mkdir_p() which had pretty
much the same purpose, except for being prone to race conditions.

I did not modify testing-related code as race conditions mostly affect
real applications and not the test environment.

Fix #4281: Race conditions when creating output directory
2017-12-16 09:50:09 +01:00
.circleci Add .circleci/config.yml 2017-05-11 16:26:24 +09:00
.github refs #3222: add PULL_REQUEST_TEMPLATE.md 2016-12-18 01:20:55 +09:00
doc Fix markup in doc/ext/math.rst 2017-12-15 22:54:52 +01:00
sphinx Use ensuredir() instead of os.makedirs() to fix race conditions 2017-12-16 09:50:09 +01:00
tests test: Skip some builders on test_build_all 2017-12-15 21:15:04 +09:00
utils Fix flake8 and style-check violations 2017-10-23 23:01:18 +09:00
.appveyor.yml Various improvements to appveyor file 2017-06-14 16:01:43 -05:00
.gitignore Reorder .gitignore 2017-09-24 21:19:21 +09:00
.travis.yml Skip latex compilations on Travis CI 2017-05-11 16:28:25 +09:00
AUTHORS Closes #1020: ext.todo todolist not linking to the page in pdflatex 2017-10-18 18:39:56 -07:00
babel.cfg babel location has changed from edgewall to pocoo 2017-05-30 00:50:25 +08:00
CHANGES Use ensuredir() instead of os.makedirs() to fix race conditions 2017-12-16 09:50:09 +01:00
CHANGES.old changelog: split off older changes (pre-1.0) to a CHANGES.old file 2013-03-29 13:05:49 +01:00
CONTRIBUTING.rst Update babel URL to new domain 2017-05-30 00:43:56 +08:00
EXAMPLES fix a glitch 2017-09-26 22:49:23 +09:00
LICENSE Update URL locations, and switch where possible to HTTPS 2017-05-30 01:23:05 +08:00
Makefile Merge branch 'stable' into 1.6-release 2017-04-25 00:40:04 +09:00
MANIFEST.in fix: missing `texinputs_win/Makefile` to be used in latexpdf builder on windows. 2017-08-22 11:03:17 +09:00
mypy.ini Update type annotations for new mypy 2017-05-07 14:28:41 +09:00
README.rst Update HTTP url to HTTPS 2017-05-30 00:38:13 +08:00
setup.cfg Fix flake8 and style-check violations 2017-10-23 23:01:18 +09:00
setup.py setup.py: Add requires for installation from tarball 2017-05-26 00:13:47 +09:00
sphinx-apidoc.py Year++ 2017-03-26 11:49:34 +09:00
sphinx-autogen.py Year++ 2017-03-26 11:49:34 +09:00
sphinx-build.py Year++ 2017-03-26 11:49:34 +09:00
sphinx-quickstart.py Year++ 2017-03-26 11:49:34 +09:00
test-reqs.txt Add sqlalchemy and whoosh to test-reqs 2017-05-07 15:44:46 +09:00
tox.ini Fix #3683: sphinx.websupport module is not provided by default 2017-05-03 23:00:03 +09:00

.. image:: https://img.shields.io/pypi/v/sphinx.svg
   :target: https://pypi.python.org/pypi/Sphinx
.. image:: https://readthedocs.org/projects/sphinx/badge/
   :target: http://www.sphinx-doc.org/
   :alt: Documentation Status
.. image:: https://travis-ci.org/sphinx-doc/sphinx.svg?branch=master
   :target: https://travis-ci.org/sphinx-doc/sphinx

=================
README for Sphinx
=================

This is the Sphinx documentation generator, see http://www.sphinx-doc.org/.


Installing
==========

Install from PyPI to use stable version::

   pip install -U sphinx

Install from PyPI to use beta version::

   pip install -U --pre sphinx

Install from newest dev version in stable branch::

   pip install git+https://github.com/sphinx-doc/sphinx@stable

Install from newest dev version in master branch::

   pip install git+https://github.com/sphinx-doc/sphinx

Install from cloned source::

   pip install .

Install from cloned source as editable::

   pip install -e .


Release signatures
==================

Releases are signed with following keys:

* `498D6B9E <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x102C2C17498D6B9E>`_
* `5EBA0E07 <https://pgp.mit.edu/pks/lookup?op=vindex&search=0x1425F8CE5EBA0E07>`_

Reading the docs
================

You can read them online at <http://www.sphinx-doc.org/>.

Or, after installing::

   cd doc
   make html

Then, direct your browser to ``_build/html/index.html``.

Testing
=======

To run the tests with the interpreter available as ``python``, use::

    make test

If you want to use a different interpreter, e.g. ``python3``, use::

    PYTHON=python3 make test

Continuous testing runs on travis: https://travis-ci.org/sphinx-doc/sphinx


Contributing
============

See `CONTRIBUTING.rst`__

.. __: CONTRIBUTING.rst