Name: python-nb2plots Version: 0.7 Release: 1%{?dist} Summary: Convert between Jupyter notebooks and sphinx docs # BSD-2-Clause: All files with the following exception. # CC0-1.0: The _version.py file generated by versioneer. If upstream updates to # versioneer 0.24 or later, the license will change to Unlicense. License: BSD-2-Clause AND CC0-1.0 URL: https://matthew-brett.github.io/nb2plots/ Source0: https://github.com/matthew-brett/nb2plots/archive/%{version}/nb2plots-%{version}.tar.gz # Fix reference to nonexistent bin_stdout # See https://github.com/matthew-brett/nb2plots/issues/31 Patch0: %{name}-bin-stdout.patch BuildArch: noarch BuildRequires: help2man BuildRequires: latexmk BuildRequires: make BuildRequires: pandoc BuildRequires: python3-devel BuildRequires: tex(latex) BuildRequires: tex(capt-of.sty) BuildRequires: tex(fncychap.sty) BuildRequires: tex(framed.sty) BuildRequires: tex(needspace.sty) BuildRequires: tex(tabulary.sty) BuildRequires: tex(upquote.sty) BuildRequires: tex(wrapfig.sty) %description This package contains tools for converting from Jupyter notebooks to ReST for Sphinx, and vice versa. %package -n python3-nb2plots # The content is BSD-2-Clause. Other licenses are due to files copied in by # Sphinx. # _static/_sphinx_javascript_frameworks_compat.js: BSD-2-Clause # _static/alabaster.css: BSD-3-Clause # _static/basic.css: BSD-2-Clause # _static/custom.css: BSD-3-Clause # _static/doctools.js: BSD-2-Clause # _static/documentation_options.js: BSD-2-Clause # _static/file.png: BSD-2-Clause # _static/jquery*.js: MIT # _static/language_data.js: BSD-2-Clause # _static/minus.png: BSD-2-Clause # _static/plus.png: BSD-2-Clause # _static/searchtools.js: BSD-2-Clause # _static/underscore*.js: MIT # genindex.html: BSD-2-Clause # search.html: BSD-2-Clause # searchindex.js: BSD-2-Clause License: BSD-2-Clause AND BSD-3-Clause AND MIT Summary: Convert between Jupyter notebooks and sphinx docs Requires: pandoc Recommends: %{py3_dist nbconvert} %description -n python3-nb2plots This package contains tools for converting from Jupyter notebooks to ReST for Sphinx, and vice versa. %package docs Summary: Documentation for %{name} %description docs Documentation for %{name}. %prep %autosetup -p1 -n nb2plots-%{version} # The ghp-import requirement is needed only for pushing to github sed -i '/ghp-import/d' doc-requirements.txt # The mock import is only needed for python < 3.3 sed -i '/mock/d' test-requirements.txt # Fix shebangs %py3_shebang_fix scripts/* setup.py doc/conf.py sed -i '/#!python/d' nb2plots/from_notebook.py %generate_buildrequires %pyproject_buildrequires -x test doc-requirements.txt %build %pyproject_wheel %py3_shebang_fix build/scripts-*/* # Documentation build export PATH=$PWD/build/scripts-%{python3_version}:$PATH export PYTHONPATH=$PWD/build/lib make -C doc html rst2html --no-datestamp README.rst README.html # Make man pages mkdir man1 for m in nb2plots rst2md sphinx2md sphinx2nb sphinx2pxml sphinx2py; do help2man --version-string=%{version} -N -o man1/${m}.1 scripts/$m done %install %pyproject_install %pyproject_save_files nb2plots # Install the man pages mkdir -p %{buildroot}%{_mandir} cp -a man1 %{buildroot}%{_mandir} %check %pytest %files -n python3-nb2plots -f %{pyproject_files} %doc Changelog README.html %{_bindir}/nb2plots %{_bindir}/rst2md %{_bindir}/sphinx2md %{_bindir}/sphinx2nb %{_bindir}/sphinx2pxml %{_bindir}/sphinx2py %{_mandir}/man1/nb2plots.1* %{_mandir}/man1/rst2md.1* %{_mandir}/man1/sphinx2md.1* %{_mandir}/man1/sphinx2nb.1* %{_mandir}/man1/sphinx2pxml.1* %{_mandir}/man1/sphinx2py.1* %files docs %doc doc/_build/html/* %changelog * Mon Aug 21 2023 Jerry James - 0.7-1 - Version 0.7 - Add patch to fix reference to nonexistent bin_stdout function * Fri Jul 21 2023 Fedora Release Engineering - 0.6.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue Jul 11 2023 Jerry James - 0.6.1-6 - Add CC0-1.0 to the License field due to versioneer - Replace deprecated pyproject_build_lib macro * Mon Jul 03 2023 Python Maint - 0.6.1-6 - Rebuilt for Python 3.12 * Thu Feb 23 2023 Jerry James - 0.6.1-5 - Dynamically generate BuildRequires * Fri Jan 20 2023 Fedora Release Engineering - 0.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Dec 13 2022 Jerry James - 0.6.1-4 - Analyze License tag for the docs subpackage - Use less aggressive globbing for the man pages * Tue Nov 1 2022 Jerry James - 0.6.1-4 - Use %%py3_shebang_fix instead of invoking pathfix.py directly - Convert License tag to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 0.6.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jun 17 2022 Python Maint - 0.6.1-2 - Rebuilt for Python 3.11 * Fri Jun 3 2022 Jerry James - 0.6.1-1 - Version 0.6.1 - All patches have been upstreamed * Mon Feb 28 2022 Lumír Balhar - 0.6-20.20201224.1a7bac4 - Fix tests for newer dependencies * Fri Jan 21 2022 Fedora Release Engineering - 0.6-19.20201224.1a7bac4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Mon Dec 20 2021 Jerry James - 0.6-18.20201224.1a7bac4 - Add -versioneer patch to fix FTBFS with python 3.11 * Fri Jul 23 2021 Fedora Release Engineering - 0.6-17.20201224.1a7bac4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jun 04 2021 Python Maint - 0.6-16.20201224.1a7bac4 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 0.6-15.20201224.1a7bac4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jan 19 2021 Jerry James - 0.6-14.20201224.1a7bac4 - Update to git head for nbconvert 6.x fixes - Remove unused dependency on python3-mock package * Wed Jul 29 2020 Fedora Release Engineering - 0.6-13.20200412.bdcaeb7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 0.6-12.20200412.bdcaeb7 - Rebuilt for Python 3.9 * Sun Apr 19 2020 Miro Hrončok - 0.6-11.20200412.bdcaeb7 - Ensure the Python package version matches the RPM package version * Sat Apr 18 2020 Jerry James - 0.6-10.20200412.bdcaeb7 - Update to git head for sphinx 3 fixes - Drop upstreamed -escape and -abc patches * Thu Jan 30 2020 Fedora Release Engineering - 0.6-9.20190809.dfa3ad2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jan 24 2020 Jerry James - 0.6-8.20190809.dfa3ad2 - Add -escape and -abc patches to silence python 3.8 warnings - Add man pages * Thu Oct 03 2019 Miro Hrončok - 0.6-7.20190809.dfa3ad2 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 0.6-6.20190809.dfa3ad2 - Rebuilt for Python 3.8 * Tue Aug 13 2019 Jerry James - 0.6-5.20190809.dfa3ad2 - Update to 20190809 git snapshot for Sphinx 2 fixes - Drop -sphinxtesters patch * Fri Jul 26 2019 Fedora Release Engineering - 0.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat Feb 02 2019 Fedora Release Engineering - 0.6-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Wed Nov 07 2018 Miro Hrončok - 0.6-3 - Drop the python2 subpackage * Sat Sep 8 2018 Jerry James - 0.6-2 - Fix problems found on review * Wed Sep 5 2018 Jerry James - 0.6-1 - Initial RPM