[packages/python-sphinx-gallery] - new

qboosh qboosh at pld-linux.org
Sun Sep 8 21:17:50 CEST 2019


commit e8b6716e58728ece8d6b78f25e7719cd3135debd
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Sep 8 21:20:35 2019 +0200

    - new

 python-sphinx-gallery.spec | 125 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 125 insertions(+)
---
diff --git a/python-sphinx-gallery.spec b/python-sphinx-gallery.spec
new file mode 100644
index 0000000..aa9ff78
--- /dev/null
+++ b/python-sphinx-gallery.spec
@@ -0,0 +1,125 @@
+#
+# Conditional build:
+%bcond_with	tests	# unit tests [testconfs dir is missing in dist tarball]
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
+
+Summary:	Sphinx extension to automatically generate an examples gallery
+Summary(pl.UTF-8):	Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
+Name:		python-sphinx-gallery
+Version:	0.4.0
+Release:	1
+License:	BSD
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/sphinx-gallery/
+Source0:	https://files.pythonhosted.org/packages/source/s/sphinx-gallery/sphinx-gallery-%{version}.tar.gz
+# Source0-md5:	1f3e578107ca253a184889733a4fbcea
+URL:		https://github.com/sphinx-gallery/sphinx-gallery
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.5
+%{?with_tests:BuildRequires:	python-pytest}
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3-modules >= 1:3.2
+%{?with_tests:BuildRequires:	python3-pytest}
+BuildRequires:	python3-setuptools
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 1.714
+Requires:	python-modules >= 1:2.5
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+A Sphinx extension that builds an HTML version of any Python script
+and puts it into an examples gallery.
+  
+It is extracted from the scikit-learn project and aims to be an
+independent general purpose extension.
+
+%description -l pl.UTF-8
+Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
+umieszczające go w galerii przykładów.
+
+Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
+niezależne rozszerzenie ogólnego przeznaczenia.
+
+%package -n python3-sphinx-gallery
+Summary:	Sphinx extension to automatically generate an examples gallery
+Summary(pl.UTF-8):	Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
+Group:		Libraries/Python
+Requires:	python3-modules >= 1:3.2
+
+%description -n python3-sphinx-gallery
+A Sphinx extension that builds an HTML version of any Python script
+and puts it into an examples gallery.
+  
+It is extracted from the scikit-learn project and aims to be an
+independent general purpose extension.
+
+%description -n python3-sphinx-gallery -l pl.UTF-8
+Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
+umieszczające go w galerii przykładów.
+
+Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
+niezależne rozszerzenie ogólnego przeznaczenia.
+
+%prep
+%setup -q -n sphinx-gallery-%{version}
+
+%build
+%if %{with python2}
+%py_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/build-2/lib \
+pytest-2 sphinx_gallery/tests
+%endif
+%endif
+
+%if %{with python3}
+%py3_build
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/build-3/lib \
+pytest-3 sphinx_gallery/tests
+%endif
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinx_gallery/tests
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinx_gallery/tests
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.rst LICENSE README.rst
+%{py_sitescriptdir}/sphinx_gallery
+%{py_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-sphinx-gallery
+%defattr(644,root,root,755)
+%doc CHANGES.rst LICENSE README.rst
+%attr(755,root,root) %{_bindir}/copy_sphinxgallery.sh
+%attr(755,root,root) %{_bindir}/sphx_glr_python_to_jupyter.py
+%{py3_sitescriptdir}/sphinx_gallery
+%{py3_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-sphinx-gallery.git/commitdiff/e8b6716e58728ece8d6b78f25e7719cd3135debd



More information about the pld-cvs-commit mailing list