| |
@@ -2,7 +2,7 @@
|
| |
|
| |
Name: python-%{srcname}
|
| |
Version: 0.6
|
| |
- Release: 2%{?dist}
|
| |
+ Release: 3%{?dist}
|
| |
Summary: Convert between Jupyter notebooks and sphinx docs
|
| |
|
| |
License: BSD
|
| |
@@ -12,24 +12,6 @@
|
| |
Patch0: %{srcname}-sphinxtesters.patch
|
| |
BuildArch: noarch
|
| |
|
| |
- BuildRequires: python2-devel
|
| |
- BuildRequires: python2dist(ipykernel)
|
| |
- BuildRequires: python2dist(ipython)
|
| |
- BuildRequires: python2dist(jupyter-client)
|
| |
- BuildRequires: python2dist(matplotlib)
|
| |
- BuildRequires: python2dist(mock)
|
| |
- BuildRequires: python2dist(nbconvert)
|
| |
- BuildRequires: python2dist(netifaces)
|
| |
- BuildRequires: python2dist(numpy)
|
| |
- BuildRequires: python2dist(numpydoc)
|
| |
- BuildRequires: python2dist(pytest)
|
| |
- BuildRequires: python2dist(scripttester)
|
| |
- BuildRequires: python2dist(setuptools)
|
| |
- BuildRequires: python2dist(six)
|
| |
- BuildRequires: python2dist(sphinx)
|
| |
- BuildRequires: python2dist(sphinxtesters)
|
| |
- BuildRequires: python2dist(texext)
|
| |
-
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: python3dist(ipykernel)
|
| |
BuildRequires: python3dist(ipython)
|
| |
@@ -63,26 +45,6 @@
|
| |
This package contains tools for converting from Jupyter notebooks to
|
| |
ReST for Sphinx, and vice versa.
|
| |
|
| |
- %package -n python2-%{srcname}
|
| |
- Summary: Convert between Jupyter notebooks and sphinx docs
|
| |
- Requires: pandoc
|
| |
- Requires: python2dist(ipykernel)
|
| |
- Requires: python2dist(ipython)
|
| |
- Requires: python2dist(jupyter-client)
|
| |
- Requires: python2dist(matplotlib)
|
| |
- Requires: python2dist(nbconvert)
|
| |
- Requires: python2dist(numpy)
|
| |
- Requires: python2dist(six)
|
| |
- Requires: python2dist(sphinx)
|
| |
- Requires: python2dist(sphinxtesters)
|
| |
- Requires: python2dist(texext)
|
| |
-
|
| |
- %{?python_provide:%python_provide python2-%{srcname}}
|
| |
-
|
| |
- %description -n python2-%{srcname}
|
| |
- This package contains tools for converting from Jupyter notebooks to
|
| |
- ReST for Sphinx, and vice versa.
|
| |
-
|
| |
%package -n python3-%{srcname}
|
| |
Summary: Convert between Jupyter notebooks and sphinx docs
|
| |
Requires: pandoc
|
| |
@@ -110,95 +72,47 @@
|
| |
Documentation for %{name}.
|
| |
|
| |
%prep
|
| |
- %autosetup -p0 -c
|
| |
-
|
| |
- pushd %{srcname}-%{version}
|
| |
+ %autosetup -p1 -n %{srcname}-%{version}
|
| |
# The ghp-import requirement is needed only for pushing to github
|
| |
sed -i '/ghp-import/d' doc-requirements.txt
|
| |
|
| |
# Fix shebangs
|
| |
- sed -i 's,#!python,#!%{__python2},' scripts/*
|
| |
+ pathfix.py -pni %{__python3} scripts/* setup.py doc/conf.py
|
| |
sed -i '/#!python/d' nb2plots/from_notebook.py
|
| |
- sed -i 's,%{_bindir}/env python,%{__python2},' setup.py
|
| |
- sed -i 's,%{_bindir}/env python3,%{__python3},' doc/conf.py
|
| |
- popd
|
| |
-
|
| |
- # Prepare to build for both python 2 and python 3
|
| |
- cp -a %{srcname}-%{version} python3
|
| |
- mv %{srcname}-%{version} python2
|
| |
|
| |
%build
|
| |
- # Python 2 build
|
| |
- pushd python2
|
| |
- %py2_build
|
| |
- popd
|
| |
-
|
| |
- # Python 3 build
|
| |
- pushd python3
|
| |
%py3_build
|
| |
|
| |
# Documentation build
|
| |
- sed -i 's/sphinx-build/sphinx-build-%{python3_version}/' doc/Makefile
|
| |
export PATH=$PWD/build/scripts-%{python3_version}:$PATH
|
| |
export PYTHONPATH=$PWD/build/lib
|
| |
- make -C doc html
|
| |
- popd
|
| |
+ make -C doc SPHINXBUILD=sphinx-build-3 html
|
| |
|
| |
%install
|
| |
- # Python 3 install
|
| |
- pushd python3
|
| |
%py3_install
|
| |
- # Rename the binaries and fix the shebangs
|
| |
- for fil in %{buildroot}%{_bindir}/*; do
|
| |
- sed -i 's,%{__python2},%{__python3},' $fil
|
| |
- mv $fil %{buildroot}%{_bindir}/python3-$(basename $fil)
|
| |
- done
|
| |
- popd
|
| |
-
|
| |
- # Python 2 install
|
| |
- pushd python2
|
| |
- %py2_install
|
| |
- popd
|
| |
|
| |
%check
|
| |
- # Test the python 2 build
|
| |
- pushd python2
|
| |
- export PYTHONPATH=$PWD/build/lib
|
| |
- pytest-%{python2_version}
|
| |
- popd
|
| |
-
|
| |
- # Test the python 3 build
|
| |
- pushd python3
|
| |
export PYTHONPATH=$PWD/build/lib
|
| |
- pytest-%{python3_version}
|
| |
- popd
|
| |
+ pytest-3
|
| |
|
| |
- %files -n python2-%{srcname}
|
| |
- %doc python2/Changelog python2/README.rst
|
| |
- %license python2/LICENSE
|
| |
+ %files -n python3-%{srcname}
|
| |
+ %doc Changelog README.rst
|
| |
+ %license LICENSE
|
| |
%{_bindir}/nb2plots
|
| |
%{_bindir}/rst2md
|
| |
%{_bindir}/sphinx2md
|
| |
%{_bindir}/sphinx2nb
|
| |
%{_bindir}/sphinx2pxml
|
| |
%{_bindir}/sphinx2py
|
| |
- %{python2_sitelib}/%{srcname}*
|
| |
-
|
| |
- %files -n python3-%{srcname}
|
| |
- %doc python3/Changelog python3/README.rst
|
| |
- %license python3/LICENSE
|
| |
- %{_bindir}/python3-nb2plots
|
| |
- %{_bindir}/python3-rst2md
|
| |
- %{_bindir}/python3-sphinx2md
|
| |
- %{_bindir}/python3-sphinx2nb
|
| |
- %{_bindir}/python3-sphinx2pxml
|
| |
- %{_bindir}/python3-sphinx2py
|
| |
%{python3_sitelib}/%{srcname}*
|
| |
|
| |
%files docs
|
| |
- %doc python3/doc/_build/html/*
|
| |
+ %doc doc/_build/html/*
|
| |
|
| |
%changelog
|
| |
+ * Wed Nov 07 2018 Miro Hrončok <mhroncok@redhat.com> - 0.6-3
|
| |
+ - Drop the python2 subpackage
|
| |
+
|
| |
* Sat Sep 8 2018 Jerry James <loganjerry@gmail.com> - 0.6-2
|
| |
- Fix problems found on review
|
| |
|
| |