]> git.pld-linux.org Git - packages/python-trollius.git/blob - python-trollius.spec
549646f3b3f0c83965d95dee21626ff1b108f044
[packages/python-trollius.git] / python-trollius.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # don't build doc
4 # tests make builder hung
5 %bcond_with     tests   # do not perform "make test"
6 %bcond_without  python2 # CPython 2.x module
7 %bcond_with     python3 # CPython 3.x module (asyncio is part of Python 3.4 standard library(
8
9 %define         module          trollius
10 %define         egg_name        trollius
11 %define         pypi_name       trollius
12 Summary:        A port of the Tulip asyncio module to Python 2
13 Name:           python-trollius
14 Version:        2.1
15 Release:        1
16 License:        Apache v2.0
17 Group:          Libraries/Python
18 Source0:        https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
19 # Source0-md5:  0b36ff1057cb5a93befe7d8ef0edcbf8
20 URL:            https://github.com/haypo/trollius
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with python2}
24 BuildRequires:  python-modules
25 BuildRequires:  python-setuptools
26 %if %{with tests}
27 BuildRequires:  python-futures
28 BuildRequires:  python-mock
29 BuildRequires:  python-modules
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-devel
34 BuildRequires:  python3-setuptools
35 %endif
36 Requires:       python-futures
37 BuildArch:      noarch
38
39 %description
40 Trollius provides infrastructure for writing single-threaded
41 concurrent code using coroutines, multiplexing I/O access over sockets
42 and other resources, running network clients and servers, and other
43 related primitives.
44
45 Trollius is a portage of the asyncio project (PEP 3156) on Python 2.
46 Trollius works on Python 2.6-3.5. It has been tested on Windows,
47 Linux, Mac OS X, FreeBSD and OpenIndiana.
48
49 %package -n python3-trollius
50 Summary:        A port of the Tulip asyncio module
51 Group:          Libraries/Python
52
53 %description -n python3-trollius
54 Trollius provides infrastructure for writing single-threaded
55 concurrent code using coroutines, multiplexing I/O access over sockets
56 and other resources, running network clients and servers, and other
57 related primitives.
58
59 Trollius is a portage of the asyncio project (PEP 3156) on Python 2.
60 Trollius works on Python 2.6-3.5. It has been tested on Windows,
61 Linux, Mac OS X, FreeBSD and OpenIndiana.
62
63 %prep
64 %setup -q -n %{pypi_name}-%{version}
65
66 %build
67 %if %{with python2}
68 %py_build
69
70 %if %{with tests}
71 %{__python} runtests.py -v1 -x test_subprocess_kill
72 %endif
73 %endif
74
75 %if %{with python3}
76 %py3_build
77
78 %if %{with tests}
79 %{__python3} runtests.py -v1 -x test_subprocess_kill
80 %endif
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85 %if %{with python2}
86 %py_install
87 %py_postclean
88 %endif
89
90 %if %{with python3}
91 %py3_install
92 %endif
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %files
99 %defattr(644,root,root,755)
100 %doc README.rst
101 %{py_sitescriptdir}/%{module}
102 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
103 %endif
104
105 %if %{with python3}
106 %files -n python3-trollius
107 %defattr(644,root,root,755)
108 %doc README.rst
109 %{py3_sitescriptdir}/%{module}
110 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
111 %endif
This page took 0.080053 seconds and 2 git commands to generate.