Skip to content

Commit 2ae9e06

Browse files
Merge pull request #366 from vincentcasseau/dev
Github action: build doc without KCore import
2 parents 85a6e5f + 8df7701 commit 2ae9e06

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

Cassiopee/KCore/doc/source/conf.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@
55
import sys
66
import os
77

8-
import KCore
9-
__version__ = KCore.__version__
8+
try:
9+
import KCore
10+
__version__ = KCore.__version__
11+
except ModuleNotFoundError:
12+
__version__ = 'undefined'
13+
with open('../../KCore/__init__.py') as f:
14+
for line in f:
15+
if '__version__' in line:
16+
__version__ = line.split('=')[1].strip()
1017

1118
# If extensions (or modules to document with autodoc) are in another directory,
1219
# add these directories to sys.path here. If the directory is relative to the

0 commit comments

Comments
 (0)