:type python_v: str
"""
+ exit_code = execute('meson --version', quiet=True, raise_error=False)
+ if exit_code == 0:
+ return
execute('rm -fr .meson .meson-src .venv')
execute('git clone https://github.com/mesonbuild/meson .meson-src')
_, output = execute('git tag -l', cwd='.meson-src', capture=True, quiet=True)
execute('rm -fr .meson .meson-src .venv')
+def pyinstall_sphinx(python_v: str = 'python3'):
+ """ Install sphinx with pyinstaller.
+
+ :param python_v: python executable
+ :type python_v: str
+ """
+
+ exit_code = execute('sphinx-build --version', quiet=True, raise_error=False)
+ if exit_code == 0:
+ return
+ execute(f'{python_v} -m venv .venv')
+ execute('.venv/bin/pip install --upgrade pip')
+ execute('.venv/bin/pip install pyinstaller')
+ execute('.venv/bin/pip install sphinx')
+ execute('.venv/bin/pip install sphinx_rtd_theme')
+ execute('.venv/bin/pyinstaller --clean --collect-all sphinx_rtd_theme --collect-all sphinxcontrib --clean '
+ '--onefile .venv/bin/sphinx-build')
+ execute('sudo cp dist/sphinx-build /usr/local/bin')
+
+
def _prepare_installed_packages_cache_for_debs():
pkg_cache = {}
packages.append('boost169-devel')
if 'docs' in features:
- packages.extend(['python3-sphinx', 'python3-sphinx_rtd_theme', 'texlive', 'texlive-capt-of',
- 'texlive-fncychap', 'texlive-framed', 'texlive-needspace', 'texlive-tabulary',
- 'texlive-titlesec', 'texlive-upquote', 'texlive-wrapfig'])
+ packages.extend(['texlive', 'texlive-capt-of', 'texlive-fncychap', 'texlive-framed', 'texlive-needspace',
+ 'texlive-tabulary', 'texlive-titlesec', 'texlive-upquote', 'texlive-wrapfig'])
+ deferred_functions.append(lambda: pyinstall_sphinx(python_v))
if 'native-pkg' in features:
packages.extend(['python3-devel', 'rpm-build'])
deferred_functions.append(pyinstall_meson)
if 'docs' in features:
- packages.extend(['python3-sphinx', 'python3-sphinx_rtd_theme', 'texlive', 'texlive-capt-of',
- 'texlive-fncychap', 'texlive-framed', 'texlive-needspace', 'texlive-tabulary',
- 'texlive-titlesec', 'texlive-upquote', 'texlive-wrapfig'])
+ packages.extend(['texlive', 'texlive-capt-of', 'texlive-fncychap', 'texlive-framed', 'texlive-needspace',
+ 'texlive-tabulary', 'texlive-titlesec', 'texlive-upquote', 'texlive-wrapfig'])
+ deferred_functions.append(pyinstall_sphinx)
if 'native-pkg' in features:
packages.extend(['python3-devel', 'rpm-build'])
deferred_functions.append(pyinstall_meson)
if 'docs' in features:
- packages.extend(['python3-sphinx', 'python3-sphinx-rtd-theme', 'doxygen', 'graphviz',
- 'tex-gyre', 'texlive', 'texlive-latex-extra'])
+ packages.extend(['doxygen', 'graphviz', 'tex-gyre', 'texlive', 'texlive-latex-extra'])
+ deferred_functions.append(pyinstall_sphinx)
if 'unittest' in features:
packages.append('googletest')