diff --git a/cmake/macros/Public.cmake b/cmake/macros/Public.cmake index a1734b6a2a..860ac1b7dc 100644 --- a/cmake/macros/Public.cmake +++ b/cmake/macros/Public.cmake @@ -1276,6 +1276,7 @@ function(pxr_build_python_documentation) --package pxr --module ${pxrPythonModulesStr} \ --inputIndex ${BUILT_XML_DOCS}/index.xml \ --pythonPath ${CMAKE_INSTALL_PREFIX}/lib/python \ + --libPath \"${CMAKE_INSTALL_PREFIX}/lib;${CMAKE_INSTALL_PREFIX}/bin;${CMAKE_INSTALL_PREFIX}/plugin/usd;${CMAKE_INSTALL_PREFIX}/share/usd/examples/plugin\" --output ${INSTALL_PYTHON_PXR_ROOT})") endfunction() # pxr_build_python_documentation \ No newline at end of file diff --git a/docs/python/convertDoxygen.py b/docs/python/convertDoxygen.py index 2f5d37018c..694652c26d 100644 --- a/docs/python/convertDoxygen.py +++ b/docs/python/convertDoxygen.py @@ -49,6 +49,7 @@ output_file = GetArgValue(['--output', '-o']) output_format = GetArgValue(['--format', '-f'], "Docstring") python_path = GetArgValue(['--pythonPath']) +lib_path = GetArgValue(['--libPath']) SetDebugMode(GetArg(['--debug', '-d'])) @@ -62,6 +63,19 @@ if (python_path != None): sys.path.append(python_path) +if lib_path != None: + lib_paths = lib_path.replace("/", os.sep).split(";") + if os.name == "nt": + for path in lib_paths: + os.add_dll_directory(path) + else: + ld_lib_paths = os.environ.get("LD_LIBRARY_PATH", "").split(os.pathsep) + for path in lib_paths: + if path not in ld_lib_paths: + ld_lib_paths.append(path) + os.environ["LD_LIBRARY_PATH"] = os.pathsep.join(ld_lib_paths) + + # # Try to import the plugin module that creates the desired output # diff --git a/docs/python/doxygenlib/cdUtils.py b/docs/python/doxygenlib/cdUtils.py index dc37954c38..13c210920b 100644 --- a/docs/python/doxygenlib/cdUtils.py +++ b/docs/python/doxygenlib/cdUtils.py @@ -131,6 +131,7 @@ def Usage(): --debug or -d = turn on debugging mode --help or -h = display this program usage statement --pythonPath = optional path to add to python lib paths + --libPath = optional ;-separated paths to allow library loading from Docstring format: Write Python doc strings from Doyxgen C++ comments. Writes