]> git.pld-linux.org Git - packages/python-sphinx_gallery.git/blame - python-sphinx_gallery.spec
- release 6 (by relup.sh)
[packages/python-sphinx_gallery.git] / python-sphinx_gallery.spec
CommitLineData
9cace9fc 1# NOTE: for versions >= 0.5 (for Python 3.5+) see python3-sphinx_gallery.spec
e8b6716e
JB
2#
3# Conditional build:
4%bcond_with tests # unit tests [testconfs dir is missing in dist tarball]
5%bcond_without python2 # CPython 2.x module
9cace9fc 6%bcond_with python3 # CPython 3.x module (built from python3-sphinx_gallery.spec)
e8b6716e
JB
7
8Summary: Sphinx extension to automatically generate an examples gallery
9Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
37f686be
JB
10Name: python-sphinx_gallery
11# NOTE: keep 0.4.x here; 0.5+ don't support python 2
e8b6716e 12Version: 0.4.0
2dfb7448 13Release: 6
e8b6716e
JB
14License: BSD
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/sphinx-gallery/
17Source0: https://files.pythonhosted.org/packages/source/s/sphinx-gallery/sphinx-gallery-%{version}.tar.gz
18# Source0-md5: 1f3e578107ca253a184889733a4fbcea
19URL: https://github.com/sphinx-gallery/sphinx-gallery
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.5
22%{?with_tests:BuildRequires: python-pytest}
23BuildRequires: python-setuptools
24%endif
25%if %{with python3}
26BuildRequires: python3-modules >= 1:3.2
27%{?with_tests:BuildRequires: python3-pytest}
28BuildRequires: python3-setuptools
29%endif
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
32Requires: python-modules >= 1:2.5
37f686be
JB
33Provides: python-sphinx-gallery = %{version}-%{release}
34Obsoletes: python-sphinx-gallery < 0.4.0-5
e8b6716e
JB
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39A Sphinx extension that builds an HTML version of any Python script
40and puts it into an examples gallery.
41
42It is extracted from the scikit-learn project and aims to be an
43independent general purpose extension.
44
45%description -l pl.UTF-8
46Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
47umieszczające go w galerii przykładów.
48
49Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
50niezależne rozszerzenie ogólnego przeznaczenia.
51
37f686be 52%package -n python3-sphinx_gallery
e8b6716e
JB
53Summary: Sphinx extension to automatically generate an examples gallery
54Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
55Group: Libraries/Python
56Requires: python3-modules >= 1:3.2
37f686be
JB
57Provides: python3-sphinx-gallery = %{version}-%{release}
58Obsoletes: python3-sphinx-gallery < 0.4.0-5
e8b6716e 59
37f686be 60%description -n python3-sphinx_gallery
e8b6716e
JB
61A Sphinx extension that builds an HTML version of any Python script
62and puts it into an examples gallery.
63
64It is extracted from the scikit-learn project and aims to be an
65independent general purpose extension.
66
37f686be 67%description -n python3-sphinx_gallery -l pl.UTF-8
e8b6716e
JB
68Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
69umieszczające go w galerii przykładów.
70
71Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
72niezależne rozszerzenie ogólnego przeznaczenia.
73
74%prep
75%setup -q -n sphinx-gallery-%{version}
76
77%build
78%if %{with python2}
79%py_build
80
81%if %{with tests}
82PYTHONPATH=$(pwd)/build-2/lib \
83pytest-2 sphinx_gallery/tests
84%endif
85%endif
86
87%if %{with python3}
88%py3_build
89
90%if %{with tests}
91PYTHONPATH=$(pwd)/build-3/lib \
92pytest-3 sphinx_gallery/tests
93%endif
94%endif
95
96%install
97rm -rf $RPM_BUILD_ROOT
98
99%if %{with python2}
100%py_install
101
102%py_postclean
103%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinx_gallery/tests
104%endif
105
106%if %{with python3}
e61c608d
JR
107# ensure tools come from python3 package
108%{__rm} -r $RPM_BUILD_ROOT%{_bindir}
e8b6716e
JB
109%py3_install
110
111%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinx_gallery/tests
112%endif
113
114%clean
115rm -rf $RPM_BUILD_ROOT
116
117%if %{with python2}
118%files
119%defattr(644,root,root,755)
120%doc CHANGES.rst LICENSE README.rst
e61c608d
JR
121%if %{without python3}
122%attr(755,root,root) %{_bindir}/copy_sphinxgallery.sh
123%attr(755,root,root) %{_bindir}/sphx_glr_python_to_jupyter.py
124%endif
e8b6716e
JB
125%{py_sitescriptdir}/sphinx_gallery
126%{py_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info
127%endif
128
129%if %{with python3}
37f686be 130%files -n python3-sphinx_gallery
e8b6716e
JB
131%defattr(644,root,root,755)
132%doc CHANGES.rst LICENSE README.rst
133%attr(755,root,root) %{_bindir}/copy_sphinxgallery.sh
134%attr(755,root,root) %{_bindir}/sphx_glr_python_to_jupyter.py
135%{py3_sitescriptdir}/sphinx_gallery
136%{py3_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info
137%endif
This page took 0.064843 seconds and 4 git commands to generate.