Commit 12106f49 authored by Stefan Mauerberger's avatar Stefan Mauerberger
Browse files

Try if sphinx is installed

parent be55210e
......@@ -24,7 +24,20 @@
import os
import codecs
from setuptools import setup
from sphinx.setup_command import BuildDoc
cmdclass = dict()
command_options = dict()
try:
from sphinx.setup_command import BuildDoc
cmdclass['build_sphinx'] = BuildDoc
# Override docs/conf.py settings
command_options['build_sphinx'] = {'project': ('dfetup.py', name),
'release': ('dfetup.py', version),
'copyright': ('dfetup.py', copyright),
'source_dir': ('dfetup.py', 'docs')}
except:
pass
# https://packaging.python.org/guides/single-sourcing-package-version/
......@@ -59,12 +72,6 @@ setup(
install_requires=[],
package_data={'pymagglobal': ['dat/*']},
include_package_data=True,
cmdclass={'build_sphinx': BuildDoc},
# Override docs/conf.py settings
command_options={
'build_sphinx': {
'project': ('dfetup.py', name),
'release': ('dfetup.py', version),
'copyright': ('dfetup.py', copyright),
'source_dir': ('dfetup.py', 'docs')}},
cmdclass=cmdclass,
command_options=command_options,
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment