]> git.pld-linux.org Git - packages/python-sphinx-gallery.git/blame - python-sphinx-gallery.spec
- rebuild with python 3.8
[packages/python-sphinx-gallery.git] / python-sphinx-gallery.spec
CommitLineData
e8b6716e
JB
1#
2# Conditional build:
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
6
7Summary: Sphinx extension to automatically generate an examples gallery
8Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
9Name: python-sphinx-gallery
10Version: 0.4.0
4aa3d5b2 11Release: 3
e8b6716e
JB
12License: BSD
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/sphinx-gallery/
15Source0: https://files.pythonhosted.org/packages/source/s/sphinx-gallery/sphinx-gallery-%{version}.tar.gz
16# Source0-md5: 1f3e578107ca253a184889733a4fbcea
17URL: https://github.com/sphinx-gallery/sphinx-gallery
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.5
20%{?with_tests:BuildRequires: python-pytest}
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-modules >= 1:3.2
25%{?with_tests:BuildRequires: python3-pytest}
26BuildRequires: python3-setuptools
27%endif
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.714
30Requires: python-modules >= 1:2.5
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35A Sphinx extension that builds an HTML version of any Python script
36and puts it into an examples gallery.
37
38It is extracted from the scikit-learn project and aims to be an
39independent general purpose extension.
40
41%description -l pl.UTF-8
42Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
43umieszczające go w galerii przykładów.
44
45Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
46niezależne rozszerzenie ogólnego przeznaczenia.
47
48%package -n python3-sphinx-gallery
49Summary: Sphinx extension to automatically generate an examples gallery
50Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów
51Group: Libraries/Python
52Requires: python3-modules >= 1:3.2
53
54%description -n python3-sphinx-gallery
55A Sphinx extension that builds an HTML version of any Python script
56and puts it into an examples gallery.
57
58It is extracted from the scikit-learn project and aims to be an
59independent general purpose extension.
60
61%description -n python3-sphinx-gallery -l pl.UTF-8
62Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i
63umieszczające go w galerii przykładów.
64
65Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako
66niezależne rozszerzenie ogólnego przeznaczenia.
67
68%prep
69%setup -q -n sphinx-gallery-%{version}
70
71%build
72%if %{with python2}
73%py_build
74
75%if %{with tests}
76PYTHONPATH=$(pwd)/build-2/lib \
77pytest-2 sphinx_gallery/tests
78%endif
79%endif
80
81%if %{with python3}
82%py3_build
83
84%if %{with tests}
85PYTHONPATH=$(pwd)/build-3/lib \
86pytest-3 sphinx_gallery/tests
87%endif
88%endif
89
90%install
91rm -rf $RPM_BUILD_ROOT
92
93%if %{with python2}
94%py_install
95
96%py_postclean
97%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/sphinx_gallery/tests
f01fe264
JB
98
99# ensure tools come from python3 package
100%{__rm} $RPM_BUILD_ROOT%{_bindir}/*
e8b6716e
JB
101%endif
102
103%if %{with python3}
104%py3_install
105
106%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinx_gallery/tests
107%endif
108
109%clean
110rm -rf $RPM_BUILD_ROOT
111
112%if %{with python2}
113%files
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
118%endif
119
120%if %{with python3}
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
128%endif
This page took 0.080792 seconds and 5 git commands to generate.