Skip to content

Commit

Permalink
docs: copy license in conf.py instead of build_docs.py
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor committed Apr 23, 2023
1 parent 3f9c551 commit 5fa55f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
from os import environ
from os.path import abspath
from pathlib import Path
from shutil import copyfile


ROOT = Path(__file__).resolve().parent

sys_path.insert(0, abspath("."))

copyfile(str(ROOT.parent / "LICENSE.rst"), str(ROOT / "license.rst"))

# -- Generate examples.inc ----------------------------------------------------

from examples import examples
Expand Down
7 changes: 2 additions & 5 deletions tools/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

from subprocess import check_call
from pathlib import Path
import sys
from sys import argv
from shutil import copyfile
from sys import argv, executable
from create_release_notes import create_release_notes


Expand All @@ -26,10 +24,9 @@ def main():
Build documentation/website
"""
create_release_notes()
copyfile(str(ROOT / 'LICENSE.rst'), str(ROOT / 'docs/license.rst'))
check_call(
[
sys.executable,
executable,
"-m",
"sphinx"
] + ([] if len(argv) < 2 else argv[2:]) + [
Expand Down

0 comments on commit 5fa55f2

Please sign in to comment.