qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <j...@apache.org>
Subject [jira] [Commented] (PROTON-2086) Move Python API docs to use Sphinx
Date Wed, 21 Aug 2019 14:11:00 GMT

    [ https://issues.apache.org/jira/browse/PROTON-2086?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16912314#comment-16912314
] 

ASF GitHub Bot commented on PROTON-2086:
----------------------------------------

kpvdr commented on pull request #186: PROTON-2086: Changed API documentation from epydoc to
Sphinx
URL: https://github.com/apache/qpid-proton/pull/186#discussion_r316206620
 
 

 ##########
 File path: python/CMakeLists.txt
 ##########
 @@ -112,35 +112,46 @@ endmacro(py_compile)
 py_compile(${CMAKE_CURRENT_BINARY_DIR} ${pysrc-generated} CPROTON_ARTIFACTS)
 py_compile(${CMAKE_CURRENT_SOURCE_DIR} "${pysrc}" PROTON_ARTIFACTS)
 
-find_program(EPYDOC_EXE epydoc)
-mark_as_advanced (EPYDOC_EXE)
-if (EPYDOC_EXE)
-   foreach (py_src_doc ${pysrc})
-     list(APPEND PY_DOC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/${py_src_doc}")
-   endforeach(py_src_doc)
+
+find_program(SPHINX_EXE_PY2 sphinx-build-2 HINTS "/usr/bin")
+mark_as_advanced (SPHINX_EXE_PY2)
+find_program(SPHINX_EXE_PY3 sphinx-build-3 HINTS "/usr/bin")
+mark_as_advanced (SPHINX_EXE_PY3)
+
+# Version of Python used to build API must match version of Sphinx used to build the docs
+get_filename_component(PYTHON_EXECUTABLE_NAME ${PYTHON_EXECUTABLE} NAME)
+# Try matching for Python 3 first
+if ((SPHINX_EXE_PY3) AND (PYTHON_EXECUTABLE_NAME STREQUAL "python3"))
+    set(BUILD_SPHINX_DOCS TRUE)
 
 Review comment:
   http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html
   Yes, it is the autodoc module that imports the target sources and extracts the docstrings
automatically. I'll leave the PYTHONPATH and LD_LIBRARY_PATH environment variables in for
now. If I can find a way to put them into the config file, I'll do that later, but the config
file is not aware of cmake variables, so it will probably involve a cmake write to the config
file? That would be ugly, we will see.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> Move Python API docs to use Sphinx
> ----------------------------------
>
>                 Key: PROTON-2086
>                 URL: https://issues.apache.org/jira/browse/PROTON-2086
>             Project: Qpid Proton
>          Issue Type: Task
>          Components: python-binding
>            Reporter: Kim van der Riet
>            Assignee: Kim van der Riet
>            Priority: Major
>
> Currently the Python API docs are generated using ePyDoc. These should be switched to
using Sphinx.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message