We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 85a6e5f + 8df7701 commit 2ae9e06Copy full SHA for 2ae9e06
Cassiopee/KCore/doc/source/conf.py
@@ -5,8 +5,15 @@
5
import sys
6
import os
7
8
-import KCore
9
-__version__ = KCore.__version__
+try:
+ 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()
17
18
# If extensions (or modules to document with autodoc) are in another directory,
19
# add these directories to sys.path here. If the directory is relative to the
0 commit comments