Skip to content

Commit

Permalink
Merge pull request #472 from jakirkham/fix_sphinx_1.7_breakage
Browse files Browse the repository at this point in the history
Fix sphinx 1.7 breakage
  • Loading branch information
jakirkham authored Feb 20, 2018
2 parents d3fa681 + db4cf35 commit 1f23437
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ install:
- export DRMAA_LIBRARY_PATH=/usr/lib/libdrmaa.so.1.0
- conda install drmaa
# Install sphinx and friends to build documentation.
- echo "sphinx 1.6.*" >> $HOME/miniconda/envs/testenv/conda-meta/pinned
- conda install sphinx
- conda install cloud_sptheme
# Install coverage and coveralls to generate and submit test coverage results for coveralls.io.
Expand Down
1 change: 0 additions & 1 deletion .wercker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ build:
- script:
name: Install dependencies for building docs.
code: |-
echo "sphinx 1.6.*" >> /opt/conda/envs/testenv/conda-meta/pinned
conda install -y sphinx
conda install -y cloud_sptheme
conda clean -tipsy
Expand Down
14 changes: 11 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
from setuptools.dist import Distribution
from distutils.version import LooseVersion

import versioneer

Expand Down Expand Up @@ -76,15 +77,22 @@ def run_tests(self):
"functools32"
]
elif sys.argv[1] == "build_sphinx":
import sphinx
import sphinx.apidoc

sphinx.apidoc.main([
sphinx.apidoc.__file__,
sphinx_apidoc_args = []
if LooseVersion(sphinx.__version__) < LooseVersion("1.7"):
sphinx_apidoc_args.append(sphinx.apidoc.__file__)

sphinx_apidoc_args.extend([
"-f", "-T", "-e", "-M",
"-o", "docs",
".", "setup.py", "tests", "versioneer.py"
".",
"setup.py", "tests", "versioneer.py"
])

sphinx.apidoc.main(sphinx_apidoc_args)

build_prefix_arg_index = None
for each_build_arg in ["-b", "--builder"]:
try:
Expand Down

0 comments on commit 1f23437

Please sign in to comment.