Skip to content

Commit

Permalink
Avoid importing brian2tools in conf.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mstimberg committed May 12, 2016
1 parent 14e620b commit 124457f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs_sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('.'))

brian2tools_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),
'..', 'brian2tools'))
# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -85,8 +87,7 @@
from brian2tools.version import version
except (ImportError, LookupError):
from setuptools_scm import get_version
import brian2tools
version = get_version(relative_to=brian2tools.__file__)
version = get_version(relative_to=brian2tools_dir)

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -402,8 +403,7 @@
# Create api docs
def run_apidoc(_):
import sphinx.apidoc as apidoc
import brian2tools
brian2tools_dir = os.path.abspath(os.path.dirname(brian2tools.__file__))
brian2tools_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'brian2tools'))
apidoc.main(argv=['sphinx-apidoc', '-f', '-e', '-M', '-o', './reference',
brian2tools_dir, os.path.join(brian2tools_dir, 'tests')])

Expand Down
2 changes: 0 additions & 2 deletions rtd-requirements.txt

This file was deleted.

0 comments on commit 124457f

Please sign in to comment.