]> git.pld-linux.org Git - packages/python-pykka.git/blob - python-pykka.spec
71857b723f12d7399cd23b8f4c868f94fec271a9
[packages/python-pykka.git] / python-pykka.spec
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
10 Summary:        Python library that provides concurrency using actor model
11 Name:           python-%{module}
12 Version:        1.2.1
13 Release:        4
14 License:        Apache v2.0
15 Group:          Libraries/Python
16 Source0:        https://github.com/jodal/pykka/archive/v%{version}/%{module}-%{version}.tar.gz
17 # Source0-md5:  0148bd046e0c265b834ffd7c454761e4
18 URL:            http://www.pykka.org/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-gevent
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-modules
30 BuildRequires:  python3-setuptools
31 %endif
32 %if %{with doc}
33 BuildRequires:  sphinx-pdg
34 %endif
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 The goal of Pykka is to provide easy to use concurrency abstractions
40 for Python by using the actor model.
41
42 Pykka 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
52 Much of the naming in Pykka is inspired by the Akka project which
53 implements actors on the JVM. Though, Pykka does not aim to be a
54 Python port of Akka.
55
56 This package provides Pykka's Python 2 libraries.
57
58 %package -n python3-pykka
59 Summary:        Python library that provides concurrency using actor model
60 Group:          Libraries/Python
61
62 %description -n python3-%{module}
63 The goal of Pykka is to provide easy to use concurrency abstractions
64 for Python by using the actor model.
65
66 Pykka 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
72 Much of the naming in Pykka is inspired by the Akka project which
73 implements actors on the JVM. Though, Pykka does not aim to be a
74 Python port of Akka.
75
76 This package provides Pykka's Python 3 libraries.
77
78 %package docs
79 Summary:        Documentation for %{name}
80 Group:          Documentation
81 Requires:       devhelp
82
83 %description docs
84 This package provides the documentation for %{name}, e.g. the API as
85 devhelp 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
104 rm -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}
115 install -d $RPM_BUILD_ROOT%{_datarootdir}/devhelp/Pykka
116 cp -a docs/_build/devhelp $RPM_BUILD_ROOT%{_datarootdir}/devhelp/Pykka
117 %endif
118
119 %clean
120 rm -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.050851 seconds and 2 git commands to generate.