-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
40 lines (35 loc) · 910 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from version import __version__
from setuptools import setup
from sphinx.setup_command import BuildDoc
import subprocess
class BuildDocApiDoc(BuildDoc, object):
"""Execute sphinx-apidoc before trigger the sphinx-build"""
def run(self):
sphinx_apidoc = subprocess.run(["sphinx-apidoc", "-f", "-o", "doc/source/", "client/"])
if sphinx_apidoc.returncode != 0:
raise Exception("sphinx-apidoc failed.")
super(BuildDocApiDoc, self).run()
setup(
version=__version__,
packages=[
'client',
'workspace'
],
python_requires='>=3.8',
install_requires=[
'requests==2.24.0'
],
setup_requires=[
'sphinx',
'sphinx_rtd_theme',
'pytest-runner'
],
tests_require=[
'pytest'
],
cmdclass={
'build_sphinx': BuildDocApiDoc
}
)