Description: Correct usage of PYTHONPATH in cmake files
 When using the PYTHONPATH auto-generated by the cmake files in
 this package, quotation marks were being added around it that
 were causing the package build to try to run PYTHONPATH as an
 executable rather than setting an environment variable.
Author: William 'jawn-smith' Wilson <jawn-smith@ubuntu.com>
Last-Update: 2022-08-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: OpenColorIO/src/bindings/python/CMakeLists.txt
===================================================================
--- OpenColorIO.orig/src/bindings/python/CMakeLists.txt
+++ OpenColorIO/src/bindings/python/CMakeLists.txt
@@ -22,7 +22,7 @@
 	# Run docstring extraction if docstrings.h is behind doxygen XML
 	add_custom_command(OUTPUT ${PYOCIO_DOCSTRINGS_H}
 		COMMAND
-			${Python_PRE_CMD} "${Python_EXECUTABLE}" "${EXTRACT_DOCSTRINGS_PY}" xml docstrings.h
+			export PYTHONPATH="${CMAKE_SOURCE_DIR}/share/docs:${CMAKE_CURRENT_BINARY_DIR}/src/bindings/python" && "${Python_EXECUTABLE}" "${EXTRACT_DOCSTRINGS_PY}" xml docstrings.h
 		WORKING_DIRECTORY
 			${PYOCIO_DOCSTRINGS_DIR}
 		DEPENDS
Index: OpenColorIO/docs/CMakeLists.txt
===================================================================
--- OpenColorIO.orig/docs/CMakeLists.txt
+++ OpenColorIO/docs/CMakeLists.txt
@@ -145,8 +145,8 @@
 
     # Run Sphinx
     add_custom_target(docs ALL
-        COMMAND
-            ${Python_PRE_CMD} "${Sphinx_EXECUTABLE}" -b html . "${CMAKE_CURRENT_BINARY_DIR}/build-html"
+	COMMAND
+	export PYTHONPATH="${CMAKE_SOURCE_DIR}/share/docs:${CMAKE_CURRENT_BINARY_DIR}/src/bindings/python" && "${Sphinx_EXECUTABLE}" -b html . "${CMAKE_CURRENT_BINARY_DIR}/build-html"
         DEPENDS
             ${CMAKE_BINARY_DIR}/docs/conf.py
             ${SPHINX_EXTENSIONS}
