]>
Commit | Line | Data |
---|---|---|
7e03ec5a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # API documentation | |
4 | %bcond_with tests # unit tests (missing in sdist) | |
5 | ||
6 | Summary: Tools for Tidelift by jaraco | |
7 | Summary(pl.UTF-8): Narzędzia do serwisu Tidelift autorstwa jaraco | |
8 | Name: python3-jaraco.tidelift | |
9 | Version: 1.5.0 | |
a080fd28 | 10 | Release: 4 |
7e03ec5a JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/jaraco.tidelift/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/j/jaraco.tidelift/jaraco.tidelift-%{version}.tar.gz | |
15 | # Source0-md5: 6a95586094fafed2703efdbec0ffc951 | |
16 | URL: https://pypi.org/project/jaraco.tidelift/ | |
17 | BuildRequires: python3-modules >= 1:3.7 | |
18 | BuildRequires: python3-setuptools | |
19 | BuildRequires: python3-setuptools_scm >= 3.4.1 | |
20 | BuildRequires: python3-toml | |
21 | %if %{with tests} | |
22 | BuildRequires: python3-autocommand | |
23 | BuildRequires: python3-importlib_resources >= 1.6 | |
24 | BuildRequires: python3-keyring | |
25 | BuildRequires: python3-pytest | |
26 | BuildRequires: python3-pytest-black >= 0.3.7 | |
27 | BuildRequires: python3-pytest-checkdocs >= 2.4 | |
28 | BuildRequires: python3-pytest-cov | |
29 | BuildRequires: python3-pytest-enabler >= 1.0.1 | |
30 | BuildRequires: python3-pytest-flake8 | |
31 | BuildRequires: python3-pytest-mypy >= 0.9.1 | |
32 | BuildRequires: python3-requests-toolbelt | |
33 | #BuildRequires: python3-types-docutils | |
34 | %endif | |
35 | BuildRequires: rpm-pythonprov | |
36 | BuildRequires: rpmbuild(macros) >= 1.714 | |
37 | %if %{with doc} | |
38 | BuildRequires: python3-jaraco.packaging >= 8.2 | |
39 | #BuildRequires: python3-jaraco.packaging >= 9 # when available | |
40 | BuildRequires: python3-rst.linker >= 1.9 | |
41 | BuildRequires: sphinx-pdg-3 | |
42 | %endif | |
43 | Requires: python3-jaraco | |
44 | Requires: python3-modules >= 1:3.7 | |
45 | BuildArch: noarch | |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
47 | ||
48 | %description | |
49 | Tools for Tidelift by jaraco. | |
50 | ||
51 | %description -l pl.UTF-8 | |
52 | Narzędzia do serwisu Tidelift autorstwa jaraco. | |
53 | ||
54 | %package apidocs | |
55 | Summary: API documentation for Python jaraco.tidelift module | |
56 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona jaraco.tidelift | |
57 | Group: Documentation | |
58 | ||
59 | %description apidocs | |
60 | API documentation for Python jaraco.tidelift module. | |
61 | ||
62 | %description apidocs -l pl.UTF-8 | |
63 | Dokumentacja API modułu Pythona jaraco.tidelift. | |
64 | ||
65 | %prep | |
66 | %setup -q -n jaraco.tidelift-%{version} | |
67 | ||
68 | # stub for setuptools | |
69 | cat >setup.py <<EOF | |
70 | from setuptools import setup | |
71 | setup() | |
72 | EOF | |
73 | ||
74 | %build | |
75 | %py3_build | |
76 | ||
77 | %if %{with tests} | |
78 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
79 | PYTEST_PLUGINS=... \ | |
80 | %{__python3} -m pytest tests | |
81 | %endif | |
82 | ||
83 | %if %{with doc} | |
84 | sphinx-build-3 -b html docs docs/build/html | |
85 | %endif | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %py3_install | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %files | |
96 | %defattr(644,root,root,755) | |
97 | %doc CHANGES.rst LICENSE README.rst | |
98 | %{py3_sitescriptdir}/jaraco/tidelift | |
99 | %{py3_sitescriptdir}/jaraco.tidelift-%{version}-py*.egg-info | |
100 | ||
101 | %if %{with doc} | |
102 | %files apidocs | |
103 | %defattr(644,root,root,755) | |
104 | %doc docs/build/html/{_static,*.html,*.js} | |
105 | %endif |