Skip to content

Commit c039b1a

Browse files
committed
Do not assume sphinx is being run from doc dir
See readthedocs/readthedocs.org#7846 (comment)
1 parent 16d7e04 commit c039b1a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/conf.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import pkg_resources
2424
import sys
2525

26-
sys.path.insert(0, os.path.abspath('..'))
26+
sys.path.insert(0, os.path.dirname(__file__))
2727

2828

2929
# -- General configuration ------------------------------------------------
@@ -60,7 +60,7 @@
6060

6161
# General information about the project.
6262
setup_cfg = configparser.ConfigParser()
63-
setup_cfg.read('../setup.cfg')
63+
setup_cfg.read(os.path.join(os.path.dirname(__file__), 'setup.cfg'))
6464
project = setup_cfg['metadata']['name']
6565
author = setup_cfg['metadata']['author']
6666
description = setup_cfg['metadata']['description']
@@ -70,7 +70,7 @@
7070
# built documents.
7171

7272
spec = importlib.util.spec_from_file_location(
73-
'_version', '../gwcelery/_version.py')
73+
'_version', os.path.join(os.path.dirname(__file__, 'gwcelery/_version.py'))
7474
module = importlib.util.module_from_spec(spec)
7575
spec.loader.exec_module(module)
7676
parsed_version = pkg_resources.parse_version(module.get_versions()['version'])

docs-requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
celery[redis]==4.4.2
22
matplotlib
3+
p_astro
34
safe_netrc
45
sphinx>=2.0

0 commit comments

Comments
 (0)