]>
Commit | Line | Data |
---|---|---|
64935573 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # API documentation | |
4 | %bcond_without tests # unit tests | |
5 | ||
6 | Summary: A friendly Python library for async concurrency and I/O | |
7 | Summary(pl.UTF-8): Przyjazna biblioteka do współbieżności asynchronicznej i we/wy | |
8 | Name: python3-trio | |
9 | Version: 0.20.0 | |
ad64a1bd | 10 | Release: 2 |
64935573 JB |
11 | License: MIT or Apache v2.0 |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/trio/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/t/trio/trio-%{version}.tar.gz | |
15 | # Source0-md5: 1310f7f08b8b8926323ed7330fedc22c | |
16 | URL: https://pypi.org/project/trio/ | |
17 | BuildRequires: python3-modules >= 1:3.7 | |
18 | BuildRequires: python3-setuptools | |
19 | %if %{with tests} | |
20 | BuildRequires: python3-astor | |
21 | BuildRequires: python3-async_generator >= 1.9 | |
22 | BuildRequires: python3-attrs >= 19.2.0 | |
23 | BuildRequires: python3-idna | |
24 | BuildRequires: python3-jedi | |
25 | BuildRequires: python3-outcome | |
26 | BuildRequires: python3-pylint | |
27 | BuildRequires: python3-pytest | |
28 | BuildRequires: python3-sniffio | |
29 | BuildRequires: python3-sortedcontainers | |
30 | BuildRequires: python3-trustme | |
31 | %endif | |
32 | BuildRequires: rpm-pythonprov | |
33 | BuildRequires: rpmbuild(macros) >= 1.714 | |
34 | %if %{with doc} | |
35 | BuildRequires: python3-sphinx_rtd_theme | |
36 | BuildRequires: python3-sphinxcontrib-trio | |
37 | BuildRequires: sphinx-pdg-3 | |
38 | %endif | |
39 | Requires: python3-modules >= 1:3.7 | |
40 | BuildArch: noarch | |
41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
42 | ||
43 | %description | |
44 | The Trio project aims to produce a production-quality, permissively | |
45 | licensed async/await-native I/O library for Python. Like all async | |
46 | libraries, its main purpose is to help you write programs that do | |
47 | multiple things at the same time with parallelized I/O. | |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Celem projektu Trio jest stworzenie produkcyjnej, mającej liberalną | |
51 | licencję natywnie asynchronicznej biblioteki we/wy dla Pythona. | |
52 | Podobnie jak w przypadku wszystkich innych biblioteki asynchroniczne, | |
53 | głównym celem jest tworzenie programów wykonujących wiele rzeczy | |
54 | jednocześnie ze zrównoleglonym we/wy. | |
55 | ||
56 | %package apidocs | |
57 | Summary: API documentation for Python trio module | |
58 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona trio | |
59 | Group: Documentation | |
60 | ||
61 | %description apidocs | |
62 | API documentation for Python trio module. | |
63 | ||
64 | %description apidocs -l pl.UTF-8 | |
65 | Dokumentacja API modułu Pythona trio. | |
66 | ||
67 | %prep | |
68 | %setup -q -n trio-%{version} | |
69 | ||
70 | %build | |
71 | %py3_build | |
72 | ||
73 | %if %{with tests} | |
74 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ | |
75 | %{__python3} -m pytest trio/_core/tests trio/tests | |
76 | %endif | |
77 | ||
78 | %if %{with doc} | |
79 | PYTHONPATH=$(pwd) \ | |
80 | %{__make} -C docs html \ | |
81 | SPHINXBUILD=sphinx-build-3 | |
82 | %endif | |
83 | ||
84 | %install | |
85 | rm -rf $RPM_BUILD_ROOT | |
86 | ||
87 | %py3_install | |
88 | ||
89 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/trio/{_core/tests,tests} | |
90 | ||
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %files | |
95 | %defattr(644,root,root,755) | |
96 | %doc LICENSE LICENSE.MIT README.rst | |
97 | %{py3_sitescriptdir}/trio | |
98 | %{py3_sitescriptdir}/trio-%{version}-py*.egg-info | |
99 | ||
100 | %if %{with doc} | |
101 | %files apidocs | |
102 | %defattr(644,root,root,755) | |
103 | %doc docs/build/html/{_static,*.html,*.js} | |
104 | %endif |