-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathconf.py
More file actions
60 lines (43 loc) · 2.32 KB
/
Copy pathconf.py
File metadata and controls
60 lines (43 loc) · 2.32 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Import projects ---------------------------------------------------------
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'polywrap-client'
release = '0.1.0'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"myst_parser",
]
templates_path = ['_templates']
exclude_patterns = []
source_suffix = [".rst", ".md"]
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = 'sphinx_rtd_theme'
html_static_path = ['_static']
# Generate necessary code for plugins
import os
import shutil
import subprocess
root_dir = os.path.join(os.path.dirname(__file__), "..", "..")
fs_plugin_dir = os.path.join(root_dir, "packages", "plugins", "polywrap-fs-plugin")
http_plugin_dir = os.path.join(root_dir, "packages", "plugins", "polywrap-http-plugin")
ethereum_plugin_dir = os.path.join(root_dir, "packages", "plugins", "polywrap-ethereum-wallet")
subprocess.check_call(["npm", "install", "-g", "yarn"], cwd=root_dir)
subprocess.check_call(["yarn", "codegen"], cwd=fs_plugin_dir)
subprocess.check_call(["yarn", "codegen"], cwd=http_plugin_dir)
subprocess.check_call(["yarn", "codegen"], cwd=ethereum_plugin_dir)
shutil.rmtree(os.path.join(root_dir, "docs", "source", "misc"), ignore_errors=True)
shutil.copytree(os.path.join(root_dir, "misc"), os.path.join(root_dir, "docs", "source", "misc"))
shutil.copy2(os.path.join(root_dir, "packages", "polywrap", "README.rst"), os.path.join(root_dir, "docs", "source", "Quickstart.rst"))
shutil.copy2(os.path.join(root_dir, "CONTRIBUTING.rst"), os.path.join(root_dir, "docs", "source", "CONTRIBUTING.rst"))