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