]> git.pld-linux.org Git - packages/python-eventlet.git/blob - python-eventlet.spec
86b7fc4fc84bf8732531c7964d8385e3eb3ac46a
[packages/python-eventlet.git] / python-eventlet.spec
1 #
2 # Conditional build:
3 %bcond_without  doc             # Sphinx documentation
4 %bcond_without  tests           # unit tests
5 %bcond_without  python2         # CPython 2.x module
6 %bcond_without  python3         # CPython 3.x module
7
8 Summary:        Highly concurrent networking library for Python 2
9 Summary(pl.UTF-8):      Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 2
10 Name:           python-eventlet
11 Version:        0.21.0
12 Release:        1
13 License:        MIT
14 Group:          Development/Languages/Python
15 #Source0Download: https://pypi.python.org/simple/eventlet/
16 Source0:        https://files.pythonhosted.org/packages/source/e/eventlet/eventlet-%{version}.tar.gz
17 # Source0-md5:  92aaac4c0abaddff9329f55d8f5bcd76
18 Patch0:         %{name}-deps.patch
19 URL:            https://pypi.python.org/pypi/eventlet/
20 BuildRequires:  rpm-pythonprov
21 BuildRequires:  rpmbuild(macros) >= 1.714
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.6
24 BuildRequires:  python-setuptools >= 5.4.1
25 %if %{with tests}
26 BuildRequires:  python-enum34
27 BuildRequires:  python-greenlet >= 0.3
28 BuildRequires:  python-nose >= 1.3.1
29 %endif
30 %endif
31 %if %{with python3}
32 BuildRequires:  python3-devel >= 1:3.3
33 BuildRequires:  python3-setuptools >= 5.4.1
34 %if %{with tests}
35 %if "%{py3_ver}" < "3.4"
36 BuildRequires:  python3-enum34
37 %endif
38 BuildRequires:  python3-greenlet >= 0.3
39 BuildRequires:  python3-nose >= 1.3.1
40 %endif
41 %endif
42 %{?with_doc:BuildRequires:      sphinx-pdg}
43 Requires:       python-modules >= 1:2.6
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 Eventlet is a concurrent networking library for Python that allows you
48 to change how you run your code, not how you write it.
49
50 It uses epoll or libevent for highly scalable non-blocking I/O.
51 Coroutines ensure that the developer uses a blocking style of
52 programming that is similar to threading, but provide the benefits of
53 non-blocking I/O. The event dispatch is implicit, which means you can
54 easily use Eventlet from the Python interpreter, or as a small part of
55 a larger application.
56
57 %description -l pl.UTF-8
58 Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
59 zmianę sposobu uruchamiania kodu bez sposobu pisania go.
60
61 Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
62 nieblokujących operacji we/wy. Korutyny zapewniają, że programista
63 korzysta z blokującego stylu programowania, podobnego do wątkowego,
64 ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
65 domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
66 interpretera Pythona lub jako małej części dużej aplikacji.
67
68 %package -n python3-eventlet
69 Summary:        Highly concurrent networking library for Python 3
70 Summary(pl.UTF-8):      Biblioteka sieciowa o dużym stopniu zrównoleglenia dla Pythona 3
71 Group:          Development/Languages/Python
72 Requires:       python3-modules >= 1:3.3
73
74 %description -n python3-eventlet
75 Eventlet is a concurrent networking library for Python that allows you
76 to change how you run your code, not how you write it.
77
78 It uses epoll or libevent for highly scalable non-blocking I/O.
79 Coroutines ensure that the developer uses a blocking style of
80 programming that is similar to threading, but provide the benefits of
81 non-blocking I/O. The event dispatch is implicit, which means you can
82 easily use Eventlet from the Python interpreter, or as a small part of
83 a larger application.
84
85 %description -n python3-eventlet -l pl.UTF-8
86 Eventlet to równoległa biblioteka sieciowa dla Ptyhona, pozwalająca na
87 zmianę sposobu uruchamiania kodu bez sposobu pisania go.
88
89 Biblioteka wykorzystuje epoll lub libevent do wysoko skalowalnych,
90 nieblokujących operacji we/wy. Korutyny zapewniają, że programista
91 korzysta z blokującego stylu programowania, podobnego do wątkowego,
92 ale mającego zalety nieblokującego we/wy. Przekazywania zdarzeń jest
93 domyślne, co oznacza, że można łatwo używać modułu Eventlet z poziomu
94 interpretera Pythona lub jako małej części dużej aplikacji.
95
96 %package apidocs
97 Summary:        API documentation for eventlet module
98 Summary(pl.UTF-8):      Dokumentacja API modułu eventlet
99 Group:          Documentation
100 %if "%{_rpmversion}" >= "5"
101 BuildArch:      noarch
102 %endif
103
104 %description apidocs
105 API documentation for eventlet module.
106
107 %description apidocs -l pl.UTF-8
108 Dokumentacja API modułu eventlet.
109
110 %prep
111 %setup -q -n eventlet-%{version}
112 %patch0 -p1
113
114 %build
115 %if %{with python2}
116 %py_build
117
118 %{?with_tests:PYTHONPATH=$(pwd) %{__python} -m unittest tests}
119 %endif
120
121 %if %{with python3}
122 %py3_build
123
124 %{?with_tests:PYTHONPATH=$(pwd) %{__python3} -m unittest tests}
125 %endif
126
127 %if %{with doc}
128 %{__make} -C doc -j1 html
129 %{__rm} -r doc/_build/html/_sources
130 %endifg
131
132 %install
133 rm -rf $RPM_BUILD_ROOT
134
135 %if %{with python2}
136 %py_install
137
138 %py_postclean
139 %endif
140
141 %if %{with python3}
142 %py3_install
143 %endif
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %if %{with python2}
149 %files
150 %defattr(644,root,root,755)
151 %doc AUTHORS LICENSE NEWS README.rst
152 %{py_sitescriptdir}/eventlet
153 %{py_sitescriptdir}/eventlet-%{version}-py*.egg-info
154 %endif
155
156 %if %{with python3}
157 %files -n python3-eventlet
158 %defattr(644,root,root,755)
159 %doc AUTHORS LICENSE NEWS README.rst
160 %{py3_sitescriptdir}/eventlet
161 %{py3_sitescriptdir}/eventlet-%{version}-py*.egg-info
162 %endif
163
164 %if %{with doc}
165 %files apidocs
166 %defattr(644,root,root,755)
167 %doc doc/_build/html/*
168 %endif
This page took 0.055984 seconds and 3 git commands to generate.