-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython3-eventlet.spec
More file actions
118 lines (100 loc) · 3.47 KB
/
python3-eventlet.spec
File metadata and controls
118 lines (100 loc) · 3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#
# Conditional build:
%bcond_without doc # Sphinx documentation
%bcond_with tests # unit tests (requires localhost networking)
Summary: Highly concurrent networking library for Python 2
Summary(pl.UTF-8): Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 2
Name: python3-eventlet
Version: 0.40.4
Release: 1
License: MIT
Group: Development/Languages/Python
#Source0Download: https://pypi.org/simple/eventlet/
Source0: https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
# Source0-md5: 42dfea2c67f3ac9b514e08f939266135
Patch0: eventlet-dns-no-doh.patch
URL: https://pypi.org/project/eventlet/
BuildRequires: python3-devel >= 1:3.9
BuildRequires: python3-build
BuildRequires: python3-hatch-vcs >= 0.3
BuildRequires: python3-hatchling >= 1.12.2
BuildRequires: python3-installer
%if %{with tests}
BuildRequires: python3-dns >= 1.15.0
BuildRequires: python3-greenlet >= 1.0
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
%if %{with doc}
BuildRequires: python3-dns >= 1.15.0
BuildRequires: python3-greenlet >= 1.0
BuildRequires: python3-sphinxcontrib-apidoc >= 0.2.0
BuildRequires: sphinx-pdg-3 >= 2
%endif
%if %{with tests}
# SO_REUSEPORT option for tests.convenience_test.test_socket_reuse
BuildRequires: uname(release) >= 3.9
%endif
Requires: python3-modules >= 1:3.9
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Eventlet is a concurrent networking library for Python that allows you
to change how you run your code, not how you write it.
It uses epoll or libevent for highly scalable non-blocking I/O.
Coroutines ensure that the developer uses a blocking style of
programming that is similar to threading, but provide the benefits of
non-blocking I/O. The event dispatch is implicit, which means you can
easily use Eventlet from the Python interpreter, or as a small part of
a larger application.
%description -l pl.UTF-8
Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
zmianę sposobu uruchamiania kodu bez sposobu pisania go.
Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
nieblokujących operacji we/wy. Korutyny zapewniają, że programista
korzysta z blokującego stylu programowania, podobnego do wątkowego,
ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
interpretera Pythona lub jako małej części dużej aplikacji.
%package apidocs
Summary: API documentation for eventlet module
Summary(pl.UTF-8): Dokumentacja API modułu eventlet
Group: Documentation
BuildArch: noarch
%description apidocs
API documentation for eventlet module.
%description apidocs -l pl.UTF-8
Dokumentacja API modułu eventlet.
%prep
%setup -q -n eventlet-%{version}
%patch -P0 -p1
# uses network
%{__rm} tests/greendns_test.py
# requires local mysql
%{__rm} tests/mysqldb_test.py
%build
%py3_build_pyproject
%if %{with tests}
PYTHONPATH=$(pwd) \
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
%{__python3} -m pytest tests
%endif
%if %{with doc}
PYTHONPATH=$(pwd) \
sphinx-build-3 -b html doc/source doc/_build/html
%endif
%install
rm -rf $RPM_BUILD_ROOT
%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS LICENSE NEWS README.rst
%{py3_sitescriptdir}/eventlet
%{py3_sitescriptdir}/eventlet-%{version}.dist-info
%if %{with doc}
%files apidocs
%defattr(644,root,root,755)
%doc doc/_build/html/{_images,_static,modules,*.html,*.js}
%endif