File tree 1 file changed +22
-2
lines changed
1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 7
7
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
8
9
9
import datetime
10
- import importlib .metadata
10
+ import os
11
+ import sys
12
+ from unittest .mock import MagicMock
13
+
14
+
15
+ class _Mock (MagicMock ):
16
+ @classmethod
17
+ def __getattr__ (cls , name ):
18
+ return MagicMock ()
19
+
20
+
21
+ MOCK_MODULES = [
22
+ "lxml" ,
23
+ "numpy" ,
24
+ ]
25
+
26
+ sys .modules .update ((mod_name , _Mock ()) for mod_name in MOCK_MODULES )
27
+ sys .path .insert (0 , os .path .abspath ('../' ))
28
+
29
+
30
+ from lxmlh import __version__
11
31
12
32
13
33
project = 'lxmlh'
14
34
copyright = f'{ datetime .date .today ().year } , Mina Sami'
15
35
author = 'Mina Sami'
16
- version = release = importlib . metadata . version ( 'lxmlh' )
36
+ version = release = __version__
17
37
18
38
# -- General configuration ---------------------------------------------------
19
39
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
You can’t perform that action at this time.
0 commit comments