]>
Commit | Line | Data |
---|---|---|
b72dfe99 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | ||
5 | Summary: Sphinx extension to automatically generate an examples gallery | |
6 | Summary(pl.UTF-8): Rozszerzenie Sphinksa do automatycznego generowania galerii przykładów | |
7 | Name: python3-sphinx_gallery | |
c73243e7 | 8 | Version: 0.7.0 |
8a28578e | 9 | Release: 5 |
b72dfe99 JB |
10 | License: BSD |
11 | Group: Libraries/Python | |
12 | #Source0Download: https://pypi.org/simple/sphinx-gallery/ | |
13 | Source0: https://files.pythonhosted.org/packages/source/s/sphinx-gallery/sphinx-gallery-%{version}.tar.gz | |
c73243e7 | 14 | # Source0-md5: bb9944c614810551c424798556ba8230 |
b72dfe99 JB |
15 | URL: https://github.com/sphinx-gallery/sphinx-gallery |
16 | BuildRequires: python3-modules >= 1:3.5 | |
17 | BuildRequires: python3-setuptools | |
18 | %if %{with tests} | |
19 | BuildRequires: python3-Sphinx >= 1.8.3 | |
20 | BuildRequires: python3-joblib | |
21 | BuildRequires: python3-pytest | |
22 | %endif | |
23 | BuildRequires: rpm-pythonprov | |
24 | BuildRequires: rpmbuild(macros) >= 1.714 | |
25 | Requires: python3-modules >= 1:3.5 | |
26 | Provides: python3-sphinx-gallery = %{version}-%{release} | |
27 | Obsoletes: python3-sphinx-gallery < 0.4.0-5 | |
28 | BuildArch: noarch | |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
30 | ||
31 | %description | |
32 | A Sphinx extension that builds an HTML version of any Python script | |
33 | and puts it into an examples gallery. | |
34 | ||
35 | It is extracted from the scikit-learn project and aims to be an | |
36 | independent general purpose extension. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Rozszerzenie Sphinksa tworzące wersję HTML dowolnego skryptu Pythona i | |
40 | umieszczające go w galerii przykładów. | |
41 | ||
42 | Zostało wyciągnięte z projektu scikit-learn z myślą o używaniu jako | |
43 | niezależne rozszerzenie ogólnego przeznaczenia. | |
44 | ||
45 | %prep | |
46 | %setup -q -n sphinx-gallery-%{version} | |
47 | ||
48 | %build | |
49 | %py3_build | |
50 | ||
51 | %if %{with tests} | |
c766a95e | 52 | # test_embed_code_links_get_data uses network |
b72dfe99 | 53 | PYTHONPATH=$(pwd)/build-3/lib \ |
c766a95e | 54 | pytest-3 sphinx_gallery/tests -k 'not test_embed_code_links_get_data' |
b72dfe99 JB |
55 | %endif |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %py3_install | |
61 | ||
62 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sphinx_gallery/tests | |
63 | ||
64 | %clean | |
65 | rm -rf $RPM_BUILD_ROOT | |
66 | ||
67 | %files | |
68 | %defattr(644,root,root,755) | |
69 | %doc CHANGES.rst LICENSE README.rst | |
70 | %attr(755,root,root) %{_bindir}/copy_sphinxgallery.sh | |
71 | %attr(755,root,root) %{_bindir}/sphx_glr_python_to_jupyter.py | |
72 | %{py3_sitescriptdir}/sphinx_gallery | |
73 | %{py3_sitescriptdir}/sphinx_gallery-%{version}-py*.egg-info |