Skip to content

Commit

Permalink
Stop using distutils with sphinx
Browse files Browse the repository at this point in the history
  • Loading branch information
llimeht committed Dec 4, 2024
1 parent 2104df5 commit 49439a6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions docs/sphinx-docs/collect_sphinx_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import os
from pathlib import Path
import shutil
from distutils.dir_util import copy_tree
# from shutil import copytree as copy_tree


# sphinx paths for the document
Expand Down Expand Up @@ -115,13 +113,13 @@ def retrieve_user_docs():
dest_dir = SPHINX_SOURCE / "user" / relative

print(f"Found sasview docs folder at \"{relative}\".")
copy_tree(source_dir, dest_dir)
shutil.copytree(source_dir, dest_dir, dirs_exist_ok=True)

print("=== Sasmodels Docs ===")
shutil.copy(SASMODELS_DOCS / "rst_prolog", SPHINX_SOURCE)
copy_tree(SASMODELS_MODEL_SOURCE, SASMODELS_MODEL_TARGET)
copy_tree(SASMODELS_DEV_SOURCE, SASMODELS_DEV_TARGET)
copy_tree(SASMODELS_GUIDE_SOURCE, SASMODELS_GUIDE_TARGET)
shutil.copytree(SASMODELS_MODEL_SOURCE, SASMODELS_MODEL_TARGET, dirs_exist_ok=True)
shutil.copytree(SASMODELS_DEV_SOURCE, SASMODELS_DEV_TARGET, dirs_exist_ok=True)
shutil.copytree(SASMODELS_GUIDE_SOURCE, SASMODELS_GUIDE_TARGET, dirs_exist_ok=True)
for filename in SASMODELS_GUIDE_EXCLUDE:
(SASMODELS_GUIDE_TARGET / filename).unlink()

Expand All @@ -137,8 +135,8 @@ def retrieve_sasdata_docs():
Copies select files from the bumps documentation into fitting perspective
"""
print("=== Sasdata Docs ===")
copy_tree(SASDATA_DEV_SOURCE, SASDATA_DEV_TARGET)
copy_tree(SASDATA_GUIDE_SOURCE, SASDATA_GUIDE_TARGET)
shutil.copytree(SASDATA_DEV_SOURCE, SASDATA_DEV_TARGET, dirs_exist_ok=True)
shutil.copytree(SASDATA_GUIDE_SOURCE, SASDATA_GUIDE_TARGET, dirs_exist_ok=True)


def retrieve_bumps_docs():
Expand Down

0 comments on commit 49439a6

Please sign in to comment.