]> git.pld-linux.org Git - packages/python-pykka.git/blame - python-pykka.spec
rebuild with python 3.10
[packages/python-pykka.git] / python-pykka.spec
CommitLineData
d8ad385d
ER
1#
2# Conditional build:
3%bcond_with doc # don't build doc
4%bcond_with tests # do not perform "make test"
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module pykka
9%define egg_name Pykka
10Summary: Python library that provides concurrency using actor model
11Name: python-%{module}
12Version: 1.2.1
0a5b41d5 13Release: 4
d8ad385d
ER
14License: Apache v2.0
15Group: Libraries/Python
16Source0: https://github.com/jodal/pykka/archive/v%{version}/%{module}-%{version}.tar.gz
17# Source0-md5: 0148bd046e0c265b834ffd7c454761e4
18URL: http://www.pykka.org/
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
21%if %{with python2}
22BuildRequires: python-modules
23BuildRequires: python-setuptools
24%if %{with tests}
25BuildRequires: python-gevent
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-modules
30BuildRequires: python3-setuptools
31%endif
32%if %{with doc}
33BuildRequires: sphinx-pdg
34%endif
35BuildArch: noarch
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38%description
39The goal of Pykka is to provide easy to use concurrency abstractions
40for Python by using the actor model.
41
42Pykka provides an actor API with two different implementations:
43
44 - ThreadingActor is built on the Python Standard Library's threading
45 and Queue modules, and has no dependencies outside Python itself. It
46 plays well together with non-actor threads.
47 - GeventActor is built on the gevent library. gevent is a
48 coroutine-based Python networking library that uses greenlet to
49 provide a high-level synchronous API on top of libevent event loop. It
50 is generally faster, but doesn't like playing with other threads.
51
52Much of the naming in Pykka is inspired by the Akka project which
53implements actors on the JVM. Though, Pykka does not aim to be a
54Python port of Akka.
55
56This package provides Pykka's Python 2 libraries.
57
58%package -n python3-pykka
59Summary: Python library that provides concurrency using actor model
60Group: Libraries/Python
61
62%description -n python3-%{module}
63The goal of Pykka is to provide easy to use concurrency abstractions
64for Python by using the actor model.
65
66Pykka for Python 3 provides an actor API with one implementation:
67
68 - ThreadingActor is built on the Python Standard Library's threading
69 and Queue modules, and has no dependencies outside Python itself. It
70 plays well together with non-actor threads.
71
72Much of the naming in Pykka is inspired by the Akka project which
73implements actors on the JVM. Though, Pykka does not aim to be a
74Python port of Akka.
75
76This package provides Pykka's Python 3 libraries.
77
78%package docs
79Summary: Documentation for %{name}
80Group: Documentation
81Requires: devhelp
82
83%description docs
84This package provides the documentation for %{name}, e.g. the API as
85devhelp docs, and examples.
86
87%prep
88%setup -q -n %{module}-%{version}
89
90%build
91%if %{with python2}
92%py_build %{?with_tests:test}
93%endif
94
95%if %{with python3}
96%py3_build %{?with_tests:test}
97%endif
98
99%if %{with doc}
100%{__make} -C docs devhelp
101%endif
102
103%install
104rm -rf $RPM_BUILD_ROOT
105%if %{with python2}
106%py_install
107%py_postclean
108%endif
109
110%if %{with python3}
111%py3_install
112%endif
113
114%if %{with doc}
115install -d $RPM_BUILD_ROOT%{_datarootdir}/devhelp/Pykka
116cp -a docs/_build/devhelp $RPM_BUILD_ROOT%{_datarootdir}/devhelp/Pykka
117%endif
118
119%clean
120rm -rf $RPM_BUILD_ROOT
121
122%if %{with python2}
123%files
124%defattr(644,root,root,755)
125%doc README.rst
126%{py_sitescriptdir}/%{module}
127%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
128%endif
129
130%if %{with python2}
131%files -n python3-%{module}
132%defattr(644,root,root,755)
133%doc README.rst
134%{py3_sitescriptdir}/%{module}
135%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
136%endif
137
138%if %{with doc}
139%files docs
140%defattr(644,root,root,755)
141%doc examples/
142%{_datarootdir}/devhelp/Pykka
143%endif
This page took 0.095331 seconds and 4 git commands to generate.