/[smecontribs]/rpms/fmt/contribs10/doc-build-use-sphinx-build-3.patch
ViewVC logotype

Contents of /rpms/fmt/contribs10/doc-build-use-sphinx-build-3.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Nov 11 05:30:15 2021 UTC (2 years, 6 months ago) by jpp
Branch: MAIN
CVS Tags: fmt-7_1_3-2_fc34, fmt-7_1_3-2_el7_sme, HEAD
Initial import

1 diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
2 index 06848450..8e5e8a83 100644
3 --- a/doc/CMakeLists.txt
4 +++ b/doc/CMakeLists.txt
5 @@ -5,10 +5,11 @@ if (NOT DOXYGEN)
6 endif ()
7
8 find_package(PythonInterp QUIET REQUIRED)
9 +find_program(SPHINX_EXECUTABLE NAMES sphinx-build sphinx-build-3)
10
11 add_custom_target(doc
12 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/build.py
13 - ${FMT_VERSION}
14 + ${SPHINX_EXECUTABLE} ${FMT_VERSION}
15 SOURCES api.rst syntax.rst usage.rst build.py conf.py _templates/layout.html)
16
17 include(GNUInstallDirs)
18 diff --git a/doc/build.py b/doc/build.py
19 index 59a7b498..8562d1bf 100755
20 --- a/doc/build.py
21 +++ b/doc/build.py
22 @@ -7,7 +7,7 @@ from subprocess import check_call, check_output, CalledProcessError, Popen, PIPE
23
24 versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', '5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', '6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2', '7.0.3', '7.1.0', '7.1.1', '7.1.2', '7.1.3']
25
26 -def build_docs(version='dev', **kwargs):
27 +def build_docs(sphinx_executable='sphinx-build', version='dev', **kwargs):
28 doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))
29 work_dir = kwargs.get('work_dir', '.')
30 include_dir = kwargs.get(
31 @@ -50,7 +50,7 @@ def build_docs(version='dev', **kwargs):
32 raise CalledProcessError(p.returncode, cmd)
33 html_dir = os.path.join(work_dir, 'html')
34 main_versions = reversed(versions[-3:])
35 - check_call(['sphinx-build',
36 + check_call([sphinx_executable,
37 '-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
38 '-Dversion=' + version, '-Drelease=' + version,
39 '-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
40 @@ -69,4 +69,4 @@ def build_docs(version='dev', **kwargs):
41 return html_dir
42
43 if __name__ == '__main__':
44 - build_docs(sys.argv[1])
45 + build_docs(sys.argv[1], sys.argv[2])
46 --
47 2.28.0
48

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed