Пакет python3-module-nbconvert: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | %define _unpackaged_files_terminate_build 1 %define oname nbconvert %def_without doc %def_without bootstrap %def_with check Name: python3-module-%oname Version: 6.0.2 Release: alt4 Summary: Converting Jupyter Notebooks License: BSD-3-Clause Group: Development/Python3 Url: https://pypi.python.org/pypi/nbconvert BuildArch: noarch # https://github.com/jupyter/nbconvert.git Source: %name-%version.tar Patch1: %oname-%version-alt-tests.patch # It may be necessary to update these files when package is updated # URLs are taken from setup.py Source1: lab-2.1.0-index.css Source2: lab-2.1.2-theme-light.css Source3: lab-2.1.2-theme-dark.css Source4: classic-5.4.0-style.css BuildRequires(pre): rpm-build-intro BuildRequires(pre): rpm-build-python3 BuildRequires(pre): rpm-macros-sphinx3 BuildRequires: python3-module-jinja2 python3-module-traitlets-tests %if_with doc BuildRequires: python3-module-html5lib python3(pandocfilters) BuildRequires: python3(sphinx_rtd_theme) python3(nbsphinx) python3(pandocfilters) BuildRequires: texlive texlive-dist BuildRequires: python3-module-sphinx-devel BuildRequires: python3-module-sphinx-sphinx-build-symlink %endif %if_without bootstrap BuildRequires: python3(IPython) BuildRequires: python3(IPython.testing.tests) BuildRequires: python3-module-ipython_genutils-tests python3-module-notebook %endif BuildRequires: python3-module-pathlib2 python3(entrypoints) python3(bleach) # FIXME: with/enabled test/check to be strict %if_with check BuildRequires: python3(pandocfilters) BuildRequires: python3(defusedxml) BuildRequires: python3(jupyterlab_pygments) BuildRequires: python3(nbclient) BuildRequires: python3(nest_asyncio) %endif %py3_provides %oname # from setup.py %py3_use mistune >= 0.8.1 %py3_use mistune < 2 %py3_use jinja2 >= 2.4 # TODO: py3_use pygments >= 2.4.1 %py3_use Pygments >= 2.4.1 %py3_use jupyterlab_pygments %py3_use traitlets >= 4.2 %py3_use jupyter_core %py3_use nbformat >= 4.4 %py3_use entrypoints >= 0.2.2 %py3_use bleach %py3_use pandocfilters >= 1.4.1 %py3_use testpath %py3_use defusedxml %py3_use nbclient >= 0.5.0 %py3_use nbclient < 0.6.0 %description Jupyter nbconvert converts notebooks to various other formats via Jinja templates. %package tests Summary: Tests for %oname Group: Development/Python3 Requires: %name = %EVR %description tests Jupyter nbconvert converts notebooks to various other formats via Jinja templates. This package contains tests for %oname. %package pickles Summary: Pickles for %oname Group: Development/Python3 %description pickles Jupyter nbconvert converts notebooks to various other formats via Jinja templates. This package contains pickles for %oname. %package docs Summary: Documentation for %oname Group: Development/Documentation BuildArch: noarch %description docs Jupyter nbconvert converts notebooks to various other formats via Jinja templates. This package contains documentation for %oname. %prep %setup %patch1 -p1 # This is intentionally set up to fail if version of required file changes. # In case of such failure it's required to obtain a new version of file. jupyterlab_css_version=$(grep '^jupyterlab_css_version' setup.py | head -n 1 | awk '{print $3}' | xargs echo) jupyterlab_theme_light_version=$(grep '^jupyterlab_theme_light_version' setup.py | head -n 1 | awk '{print $3}' | xargs echo) jupyterlab_theme_dark_version=$(grep '^jupyterlab_theme_dark_version' setup.py | head -n 1 | awk '{print $3}' | xargs echo) notebook_css_version=$(grep '^notebook_css_version' setup.py | head -n 1 | awk '{print $3}' | xargs echo) cp %SOURCE1 . cp %SOURCE2 . cp %SOURCE3 . cp %SOURCE4 . mkdir -p share/jupyter/nbconvert/templates/lab/static mkdir -p share/jupyter/nbconvert/templates/classic/static mv lab-${jupyterlab_css_version}-index.css share/jupyter/nbconvert/templates/lab/static/index.css mv lab-${jupyterlab_theme_light_version}-theme-light.css share/jupyter/nbconvert/templates/lab/static/theme-light.css mv lab-${jupyterlab_theme_dark_version}-theme-dark.css share/jupyter/nbconvert/templates/lab/static/theme-dark.css mv classic-${notebook_css_version}-style.css share/jupyter/nbconvert/templates/classic/static/style.css %if_with doc %prepare_sphinx3 docs ln -s ../objects.inv docs/source/ %endif %build %python3_build_debug %install %python3_install %if_with doc export PYTHONPATH=$PWD export PATH=$PATH:%buildroot%_bindir %make -C docs pickle %make -C docs html cp -fR docs/build/pickle %buildroot%python3_sitelibdir/%oname/ %endif %if_without bootstrap %check export LC_ALL=en_US.UTF-8 export NO_PYPPETEER=true PYTHONPATH=$(pwd) py.test3 -vv %endif %files %doc *.md %_bindir/* %_datadir/jupyter %python3_sitelibdir/%oname %python3_sitelibdir/%oname-%version-py*.egg-info %exclude %python3_sitelibdir/%oname/tests %exclude %python3_sitelibdir/%oname/*/tests %if_with doc %exclude %python3_sitelibdir/%oname/pickle %endif %files tests %python3_sitelibdir/%oname/tests %python3_sitelibdir/%oname/*/tests %if_with doc %files pickles %python3_sitelibdir/%oname/pickle %files docs %doc docs/build/html/* %endif %changelog * Thu Jun 24 2021 Sergey Bolshakov <sbolshakov@altlinux.ru> 6.0.2-alt4 - drop excessive python3-module-jinja2-tests BR * Thu Jun 17 2021 Aleksei Nikiforov <darktemplar@altlinux.org> 6.0.2-alt3 - Updated build dependencies. * Wed Oct 21 2020 Vitaly Lipatov <lav@altlinux.ru> 6.0.2-alt2 - improve requires * Mon Sep 14 2020 Aleksei Nikiforov <darktemplar@altlinux.org> 6.0.2-alt1 - Updated to upstream version 6.0.2. - Disabled build for python-2. * Sun May 05 2019 Michael Shigorin <mike@altlinux.org> 5.3.1-alt5 - fixed doc knob (renamed from docs for consistency) - minor spec cleanup * Fri May 11 2018 Andrey Bychkov <mrdrew@altlinux.org> 5.3.1-alt4 - rebuild with all requires * Fri May 11 2018 Andrey Bychkov <mrdrew@altlinux.org> 5.3.1-alt3 - off build requires for nmu * Tue Mar 13 2018 Aleksei Nikiforov <darktemplar@altlinux.org> 5.3.1-alt2 - Updated build dependencies. * Thu Nov 09 2017 Aleksei Nikiforov <darktemplar@altlinux.org> 5.3.1-alt1 - Updated to upstream version 5.3.1. - Disabled building docs. * Wed Aug 02 2017 Aleksei Nikiforov <darktemplar@altlinux.org> 4.0.0-alt3 - Fixed build. * Sun Mar 13 2016 Ivan Zakharyaschev <imz@altlinux.org> 4.0.0-alt2.1.1 - (NMU) rebuild with rpm-build-python3-0.1.9 (for common python3/site-packages/ and auto python3.3-ABI dep when needed) * Thu Jan 28 2016 Mikhail Efremov <sem@altlinux.org> 4.0.0-alt2.1 - NMU: Use buildreq for BR. * Sun Aug 23 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 4.0.0-alt2 - Enabled check * Sat Aug 22 2015 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 4.0.0-alt1 - Initial build for Sisyphus |