3 %bcond_with tests # unit tests [testconfs dir is missing in dist tarball]
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Sphinx extension to automatically generate an examples gallery
8 Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
9 Name: python-sphinx-gallery
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/sphinx-gallery/
15 Source0: https://files.pythonhosted.org/packages/source/s/sphinx-gallery/sphinx-gallery-%{version}.tar.gz
16 # Source0-md5: 1f3e578107ca253a184889733a4fbcea
17 URL: https://github.com/sphinx-gallery/sphinx-gallery
19 BuildRequires: python-modules >= 1:2.5
20 %{?with_tests:BuildRequires: python-pytest}
21 BuildRequires: python-setuptools
24 BuildRequires: python3-modules >= 1:3.2
25 %{?with_tests:BuildRequires: python3-pytest}
26 BuildRequires: python3-setuptools
28 BuildRequires: rpm-pythonprov
29 BuildRequires: rpmbuild(macros) >= 1.714
30 Requires: python-modules >= 1:2.5
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 A Sphinx extension that builds an HTML version of any Python script
36 and puts it into an examples gallery.
38 It is extracted from the scikit-learn project and aims to be an
39 independent general purpose extension.
41 %description -l pl.UTF-8
42 Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
43 umieszczające go w galerii przykładów.
45 Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
46 niezależne rozszerzenie ogólnego przeznaczenia.
48 %package -n python3-sphinx-gallery
49 Summary: Sphinx extension to automatically generate an examples gallery
50 Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
51 Group: Libraries/Python
52 Requires: python3-modules >= 1:3.2
54 %description -n python3-sphinx-gallery
55 A Sphinx extension that builds an HTML version of any Python script
56 and puts it into an examples gallery.
58 It is extracted from the scikit-learn project and aims to be an
59 independent general purpose extension.
61 %description -n python3-sphinx-gallery -l pl.UTF-8
62 Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
63 umieszczające go w galerii przykładów.
65 Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
66 niezależne rozszerzenie ogólnego przeznaczenia.
69 %setup -q -n sphinx-gallery-%{version}
76 PYTHONPATH=$(pwd)/build-2/lib \
77 pytest-2 sphinx_gallery/tests
85 PYTHONPATH=$(pwd)/build-3/lib \
86 pytest-3 sphinx_gallery/tests
91 rm -rf $RPM_BUILD_ROOT
97 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinx_gallery/tests
99 # ensure tools come from python3 package
100 %{__rm} $RPM_BUILD_ROOT%{_bindir}/*
106 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinx_gallery/tests
110 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %doc CHANGES.rst LICENSE README.rst
116 %{py_sitescriptdir}/sphinx_gallery
117 %{py_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info
121 %files -n python3-sphinx-gallery
122 %defattr(644,root,root,755)
123 %doc CHANGES.rst LICENSE README.rst
124 %attr(755,root,root) %{_bindir}/copy_sphinxgallery.sh
125 %attr(755,root,root) %{_bindir}/sphx_glr_python_to_jupyter.py
126 %{py3_sitescriptdir}/sphinx_gallery
127 %{py3_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info