]>
Commit | Line | Data |
---|---|---|
818a90a4 JB |
1 | # TODO: package python3-curio and enable curio test |
2 | # | |
3 | # Conditional build: | |
4 | %bcond_without doc # API documentation | |
5 | %bcond_without tests # unit tests | |
6 | ||
7 | Summary: Sniff out which async library your code is running under | |
8 | Summary(pl.UTF-8): Podsłuchiwanie, którą bibliotekę asynchroniczną wykorzystuje kod | |
9 | Name: python3-sniffio | |
fff0d30f JB |
10 | Version: 1.3.0 |
11 | Release: 1 | |
818a90a4 JB |
12 | License: MIT or Apache v2.0 |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/sniffio/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/s/sniffio/sniffio-%{version}.tar.gz | |
fff0d30f | 16 | # Source0-md5: abb96bcda81817d6c632915c53ac29c8 |
818a90a4 | 17 | URL: https://pypi.org/project/sniffio/ |
fff0d30f | 18 | BuildRequires: python3-modules >= 1:3.7 |
818a90a4 JB |
19 | BuildRequires: python3-setuptools |
20 | %if %{with tests} | |
21 | #BuildRequires: python3-curio | |
22 | %endif | |
23 | BuildRequires: rpm-pythonprov | |
24 | BuildRequires: rpmbuild(macros) >= 1.714 | |
25 | %if %{with doc} | |
26 | BuildRequires: python3-sphinx_rtd_theme | |
27 | BuildRequires: python3-sphinxcontrib-trio | |
28 | BuildRequires: sphinx-pdg-3 | |
29 | %endif | |
fff0d30f | 30 | Requires: python3-modules >= 1:3.7 |
818a90a4 JB |
31 | BuildArch: noarch |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
34 | %description | |
35 | Sniff out which async library your code is running under. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Podsłuchiwanie, którą bibliotekę asynchroniczną wykorzystuje kod. | |
39 | ||
40 | %package apidocs | |
41 | Summary: API documentation for Python sniffio module | |
42 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona sniffio | |
43 | Group: Documentation | |
44 | ||
45 | %description apidocs | |
46 | API documentation for Python sniffio module. | |
47 | ||
48 | %description apidocs -l pl.UTF-8 | |
49 | Dokumentacja API modułu Pythona sniffio. | |
50 | ||
51 | %prep | |
52 | %setup -q -n sniffio-%{version} | |
53 | ||
54 | %build | |
55 | %py3_build | |
56 | ||
57 | %if %{with tests} | |
58 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
59 | %{__python3} -m pytest sniffio/_tests -k 'not test_curio' | |
60 | %endif | |
61 | ||
62 | %if %{with doc} | |
63 | PYTHONPATH=$(pwd) \ | |
64 | %{__make} -C docs html \ | |
65 | SPHINXBUILD=sphinx-build-3 | |
66 | %endif | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %py3_install | |
72 | ||
73 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sniffio/_tests | |
74 | ||
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %files | |
79 | %defattr(644,root,root,755) | |
80 | %doc LICENSE LICENSE.MIT README.rst | |
81 | %{py3_sitescriptdir}/sniffio | |
82 | %{py3_sitescriptdir}/sniffio-%{version}-py*.egg-info | |
83 | ||
84 | %if %{with doc} | |
85 | %files apidocs | |
86 | %defattr(644,root,root,755) | |
87 | %doc docs/build/html/{_static,*.html,*.js} | |
88 | %endif |