]>
Commit | Line | Data |
---|---|---|
39a8b73e JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # API documentation | |
4 | %bcond_with tests # unit tests (not included in sdist) | |
5 | ||
6 | Summary: Add inline tabbed content to your Sphinx documentation | |
7 | Summary(pl.UTF-8): Wstawianie treści z tabulacjami do dokumentacji Sphinksa | |
8 | Name: python3-sphinx_inline_tabs | |
9 | Version: 2021.8.17b10 | |
bb2a6615 | 10 | Release: 3 |
39a8b73e JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/sphinx-inline-tabs/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/s/sphinx-inline-tabs/sphinx_inline_tabs-%{version}.tar.gz | |
15 | # Source0-md5: 4f2f5fded69590e6442101f3757de770 | |
16 | URL: https://pypi.org/project/sphinx-inline-tabs/ | |
17 | BuildRequires: python3-modules >= 1:3.8 | |
18 | BuildRequires: python3-setuptools | |
19 | %if %{with tests} | |
20 | BuildRequires: python3-Sphinx >= 3 | |
21 | BuildRequires: python3-pytest | |
22 | BuildRequires: python3-pytest-cov | |
23 | BuildRequires: python3-pytest-xdist | |
24 | %endif | |
25 | %if %{with doc} | |
26 | BuildRequires: python3-Sphinx >= 3 | |
27 | BuildRequires: python3-furo | |
28 | BuildRequires: python3-myst_parser | |
29 | %endif | |
30 | BuildRequires: rpm-pythonprov | |
31 | BuildRequires: rpmbuild(macros) >= 1.714 | |
32 | BuildRequires: sed >= 4.0 | |
33 | Requires: python3-modules >= 1:3.8 | |
34 | BuildArch: noarch | |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
36 | ||
37 | %description | |
38 | Add inline tabbed content to your Sphinx documentation. | |
39 | ||
40 | %description -l pl.UTF-8 | |
41 | Wstawianie treści z tabulacjami do dokumentacji Sphinksa. | |
42 | ||
43 | %package apidocs | |
44 | Summary: API documentation for Python sphinx_inline_tabs module | |
45 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona sphinx_inline_tabs | |
46 | Group: Documentation | |
47 | ||
48 | %description apidocs | |
49 | API documentation for Python sphinx_inline_tabs module. | |
50 | ||
51 | %description apidocs -l pl.UTF-8 | |
52 | Dokumentacja API modułu Pythona sphinx_inline_tabs. | |
53 | ||
54 | %prep | |
55 | %setup -q -n sphinx_inline_tabs-%{version} | |
56 | ||
57 | # force setuptools for pythonegg dependencies | |
58 | %{__sed} -i -e 's/distutils.core/setuptools/' setup.py | |
59 | ||
60 | %build | |
61 | %py3_build | |
62 | ||
63 | %if %{with tests} | |
64 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
65 | %{__python3} -m pytest tests | |
66 | %endif | |
67 | ||
68 | %if %{with doc} | |
69 | cd docs | |
70 | PYTHONPATH=$(pwd)/../src \ | |
651c814d | 71 | %{__python3} -m sphinx . build/html |
39a8b73e JB |
72 | %endif |
73 | ||
74 | %install | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %py3_install | |
78 | ||
79 | %clean | |
80 | rm -rf $RPM_BUILD_ROOT | |
81 | ||
82 | %files | |
83 | %defattr(644,root,root,755) | |
84 | %doc LICENSE README.md | |
85 | %{py3_sitescriptdir}/sphinx_inline_tabs | |
86 | %{py3_sitescriptdir}/sphinx_inline_tabs-%{version}-py*.egg-info | |
87 | ||
88 | %if %{with doc} | |
89 | %files apidocs | |
90 | %defattr(644,root,root,755) | |
91 | %doc docs/build/html/* | |
92 | %endif |