]>
Commit | Line | Data |
---|---|---|
ed610af8 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_with python3 # CPython 3.x module (for Python 3.3, 3.4) | |
6 | ||
7 | Summary: Back-ported, durable, and portable selectors | |
8 | Summary(pl.UTF-8): Zbackportowane, trwałe i przenośne selektory | |
9 | Name: python-selectors2 | |
10 | Version: 2.0.2 | |
a8bc9cd6 | 11 | Release: 2 |
ed610af8 JB |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/selectors2/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/s/selectors2/selectors2-%{version}.tar.gz | |
16 | # Source0-md5: 77089bc7a640bf09f784cc029195c24a | |
17 | URL: https://pypi.org/project/selectors2/ | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules >= 1:2.6 | |
20 | BuildRequires: python-setuptools | |
21 | %if %{with tests} | |
22 | BuildRequires: python-mock >= 2.0.0 | |
23 | BuildRequires: python-nose >= 1.3.7 | |
24 | BuildRequires: python-psutil >= 5.2.2 | |
25 | %if "%{py_ver}" < "2.7" | |
26 | BuildRequires: python-unittest2 | |
27 | %endif | |
28 | %endif | |
29 | %endif | |
30 | %if %{with python3} | |
31 | BuildRequires: python3-modules >= 1:3.3 | |
32 | BuildRequires: python3-modules < 1:3.5 | |
33 | BuildRequires: python3-setuptools | |
34 | %if %{with tests} | |
35 | BuildRequires: python3-mock >= 2.0.0 | |
36 | BuildRequires: python3-nose >= 1.3.7 | |
37 | BuildRequires: python3-psutil >= 5.2.2 | |
38 | %endif | |
39 | %endif | |
40 | BuildRequires: rpm-pythonprov | |
41 | BuildRequires: rpmbuild(macros) >= 1.714 | |
42 | Requires: python-modules >= 1:2.6 | |
43 | BuildArch: noarch | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %description | |
47 | Backported, durable, and portable selectors designed to replace the | |
48 | standard library selectors module. | |
49 | ||
50 | %description -l pl.UTF-8 | |
51 | Zbackportowane, trwałe i przenośne selektory, zaprojektowane w celu | |
52 | zastąpienia modułu biblioteki standardowej selectors. | |
53 | ||
54 | %package -n python3-selectors2 | |
55 | Summary: Back-ported, durable, and portable selectors | |
56 | Summary(pl.UTF-8): Zbackportowane, trwałe i przenośne selektory | |
57 | Group: Libraries/Python | |
58 | Requires: python3-modules >= 1:3.3 | |
59 | ||
60 | %description -n python3-selectors2 | |
61 | Backported, durable, and portable selectors designed to replace the | |
62 | standard library selectors module. | |
63 | ||
64 | %description -n python3-selectors2 -l pl.UTF-8 | |
65 | Zbackportowane, trwałe i przenośne selektory, zaprojektowane w celu | |
66 | zastąpienia modułu biblioteki standardowej selectors. | |
67 | ||
68 | %prep | |
69 | %setup -q -n selectors2-%{version} | |
70 | ||
71 | %build | |
72 | %if %{with python2} | |
73 | %py_build | |
74 | ||
75 | %if %{with tests} | |
76 | nosetests-%{py_ver} tests/test_selectors2.py | |
77 | %endif | |
78 | %endif | |
79 | ||
80 | %if %{with python3} | |
81 | %py3_build | |
82 | ||
83 | %if %{with tests} | |
84 | nosetests-%{py3_ver} tests/test_selectors2.py | |
85 | %endif | |
86 | %endif | |
87 | ||
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %if %{with python2} | |
92 | %py_install | |
93 | ||
94 | %py_postclean | |
95 | %endif | |
96 | ||
97 | %if %{with python3} | |
98 | %py3_install | |
99 | %endif | |
100 | ||
101 | %clean | |
102 | rm -rf $RPM_BUILD_ROOT | |
103 | ||
104 | %if %{with python2} | |
105 | %files | |
106 | %defattr(644,root,root,755) | |
107 | %doc CHANGELOG.rst LICENSE README.rst | |
108 | %{py_sitescriptdir}/selectors2.py[co] | |
109 | %{py_sitescriptdir}/selectors2-%{version}-py*.egg-info | |
110 | %endif | |
111 | ||
112 | %if %{with python3} | |
113 | %files -n python3-selectors2 | |
114 | %defattr(644,root,root,755) | |
115 | %doc CHANGELOG.rst LICENSE README.rst | |
116 | %{py3_sitescriptdir}/selectors2.py | |
117 | %{py3_sitescriptdir}/__pycache__/selectors2.cpython-*.py[co] | |
118 | %{py3_sitescriptdir}/selectors2-%{version}-py*.egg-info | |
119 | %endif |