Skip to content

Commit

Permalink
Extract docstrings from source instead of module.
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkCallow committed Mar 6, 2025
1 parent 5b6ec3a commit 447b78e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
7 changes: 0 additions & 7 deletions interface/python_binding/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,6 @@ if(KTX_FEATURE_DOC)
${KTX_BUILD_DIR}/interface/python_binding/docs/pyktx.rst
${KTX_BUILD_DIR}/interface/python_binding/docs/pyktx.native.rst
${pyktx_egg_info}
# COMMAND
# ${CMAKE_COMMAND} -E env
# LIBKTX_INCLUDE_DIR=${CMAKE_SOURCE_DIR}/include
# LIBKTX_LIB_DIR=${LIBKTX_LIB_DIR}
# DYLD_LIBRARY_PATH=${LIBKTX_LIB_DIR}:$ENV{DYLD_LIBRARY_PATH}
# LD_LIBRARY_PATH=${LIBKTX_LIB_DIR}:$ENV{LD_LIBRARY_PATH}
# ${PYTHON_EXECUTABLE} buildscript.py
COMMAND
${CMAKE_COMMAND} -E copy
index.rst conf.py ${KTX_BUILD_DIR}/interface/python_binding
Expand Down
8 changes: 6 additions & 2 deletions interface/python_binding/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,15 @@
import sys

current_dir = os.path.dirname(__file__)
target_dir = os.path.abspath(os.path.join(current_dir, "."))
# Extract docstrings from source rather than modules to avoid having
# to build, and build libktx, in order to produce documentation.
target_dir = os.path.abspath(os.path.join(current_dir, "pyktx"))
# To extract from module instead, uncomment the below and comment the above.
#target_dir = os.path.abspath(os.path.join(current_dir, "."))
sys.path.insert(0, target_dir)

project = 'pyktx'
copyright = '2023, Shukant Pal'
copyright = '2025, Khronos Group, Inc.'
author = 'Shukant Pal'

# -- General configuration ---------------------------------------------------
Expand Down

0 comments on commit 447b78e

Please sign in to comment.