Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Wrap sphinx.setup_command with try-except block
  • Loading branch information
matwey committed Feb 18, 2020
1 parent 092158a commit ee9dae4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions setup.py
@@ -1,6 +1,9 @@
from setuptools import find_packages, setup
from sphinx.setup_command import BuildDoc
cmdclass = {'build_sphinx': BuildDoc}
try:
from sphinx.setup_command import BuildDoc
cmdclass = {'build_sphinx': BuildDoc}
except ImportError:
pass

name="pybeam"
version="0.6"
Expand All @@ -15,7 +18,7 @@
license='MIT',
packages=find_packages(exclude=(test_suite,)),
test_suite=test_suite,
install_requires=['construct>=2.9,<2.11', 'six', 'sphinx'],
install_requires=['construct>=2.9,<2.11', 'six'],
command_options={
'build_sphinx': {
'project': ('setup.py', name),
Expand Down

0 comments on commit ee9dae4

Please sign in to comment.