Skip to content

Commit 6065ae8

Browse files
committed
Also support pybuild directory for doc build.
1 parent 2e2b26c commit 6065ae8

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

doc/conf.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@
2828
build_dir = "../build/lib.%s-%s" % (sysconfig.get_platform(),
2929
sys.implementation.cache_tag)
3030
if not os.path.exists(build_dir):
31-
print("""
32-
Compiled version of pyosmium not found, please build pyosmium for Python {}.{}
33-
before building the documentation.
34-
""".format(*sys.version_info))
35-
raise RuntimeError("Cannot find pyosmium")
31+
# pybuild
32+
build_dir = "../.pybuild/cpython3_%s.%s_pyosmium/build" % (
33+
sys.version_info[0], sys.version_info[1]
34+
)
35+
36+
if not os.path.exists(build_dir):
37+
print("""
38+
Compiled version of pyosmium not found, please build pyosmium for Python {}.{}
39+
before building the documentation.
40+
""".format(*sys.version_info))
41+
raise RuntimeError("Cannot find pyosmium")
3642

3743
# insert after the current directory
3844
sys.path.insert(0, os.path.normpath(os.path.join(os.path.abspath('.'), build_dir)))

0 commit comments

Comments
 (0)