diff options
author | Cristian Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2021-02-09 13:30:12 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-10 12:25:05 +0000 |
commit | 5cf9f02923b6b4cf9f2de93c7f563da07eecb032 (patch) | |
tree | fde6ecbe9ca047f3f3840c9703e10213b0bc784b /sources | |
parent | e2c1c3b7223821445aac275a43ef24e9a007892b (diff) |
doc: use example gallery tool in build process
This enables the gallery generation tool in the CMake-based process
in charge of building the documentation.
The old 'index.rst' file was removed,
and rules were added to the .gitignore to avoid adding the generated
files.
Fixes: PYSIDE-1490
Change-Id: I71a5a9e34ce18f42dbc7af8a3e4be65924a79d67
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit 75a50de5787fbc14a9183e50b10cd3a57495ec1d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'sources')
-rw-r--r-- | sources/pyside6/doc/CMakeLists.txt | 13 | ||||
-rw-r--r-- | sources/pyside6/doc/examples/index.rst | 14 |
2 files changed, 13 insertions, 14 deletions
diff --git a/sources/pyside6/doc/CMakeLists.txt b/sources/pyside6/doc/CMakeLists.txt index a16be06bc..cbec282ab 100644 --- a/sources/pyside6/doc/CMakeLists.txt +++ b/sources/pyside6/doc/CMakeLists.txt @@ -16,6 +16,19 @@ set(TS_ROOT "${ROOT}/PySide6") file(REMOVE ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf ${CMAKE_CURRENT_LIST_DIR}/pyside.qdocconf.in) +# We need to find the interpreter when running this only +# for a rst_build_docs case, and not a full doc build +if (NOT FULLDOCSBUILD) + find_package(Python COMPONENTS Interpreter) + set(PYTHON_EXECUTABLE ${Python_EXECUTABLE}) +endif() + +# Generate example gallery +message(STATUS "Generating example gallery") +set(EXAMPLE_TOOL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../../../tools/example_gallery/main.py") +execute_process(COMMAND ${PYTHON_EXECUTABLE} ${EXAMPLE_TOOL_DIR} + WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) + set(SHIBOKEN_INTERSPHINX_FILE "${ROOT}/pyside6/shiboken6/objects.inv") set(HAS_WEBENGINE_WIDGETS 0) set(SKIP_SPHINX_WARNINGS 1) diff --git a/sources/pyside6/doc/examples/index.rst b/sources/pyside6/doc/examples/index.rst deleted file mode 100644 index 069d54404..000000000 --- a/sources/pyside6/doc/examples/index.rst +++ /dev/null @@ -1,14 +0,0 @@ -|project| Examples -=================== - -A collection of examples are provided with |project| to help new users -to understand different use cases of the module. -You can find all the examples inside the ``pyside-setup`` on the ``examples`` -directory, or you can access them after installing |pymodname| from ``pip`` -inside the ``site-packages/PySide6/examples`` directory. - -.. toctree:: - :maxdepth: 1 - - tabbedbrowser.rst - ../pyside-examples/all-pyside-examples.rst |