]>
Commit | Line | Data |
---|---|---|
11f148ce JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
c0dad441 | 5 | %bcond_without doc # Sphinx documentation |
324ebba5 | 6 | %bcond_with tests # py.test based tests [use network, need some environment] |
11f148ce JK |
7 | |
8 | %define module execnet | |
9 | Summary: Rapid multi-Python deployment | |
8d193089 | 10 | Summary(pl.UTF-8): Szybkie wdrożenia na wielu Pythonach |
11f148ce | 11 | Name: python-%{module} |
46d7835f | 12 | Version: 1.9.0 |
b344f044 | 13 | Release: 4 |
11f148ce JK |
14 | License: MIT |
15 | Group: Libraries/Python | |
c0dad441 JB |
16 | #Source0Download: https://pypi.org/simple/execnet/ |
17 | Source0: https://files.pythonhosted.org/packages/source/e/execnet/%{module}-%{version}.tar.gz | |
46d7835f | 18 | # Source0-md5: 69f7f721586d5a02b66cac7cb388b7e3 |
324ebba5 | 19 | URL: https://codespeak.net/execnet/ |
11f148ce | 20 | %if %{with python2} |
3b64f676 | 21 | BuildRequires: python-modules >= 1:2.7 |
d2fcc7bf | 22 | BuildRequires: python-setuptools >= 1:7.0 |
8d193089 JB |
23 | BuildRequires: python-setuptools_scm |
24 | %if %{with tests} | |
8d193089 JB |
25 | BuildRequires: python-py |
26 | BuildRequires: python-pytest | |
3b64f676 | 27 | BuildRequires: python-pytest-timeout |
8d193089 | 28 | %endif |
11f148ce JK |
29 | %endif |
30 | %if %{with python3} | |
440812c8 | 31 | BuildRequires: python3-modules >= 1:3.5 |
d2fcc7bf | 32 | BuildRequires: python3-setuptools >= 1:7.0 |
8d193089 JB |
33 | BuildRequires: python3-setuptools_scm |
34 | %if %{with tests} | |
8d193089 JB |
35 | BuildRequires: python3-py |
36 | BuildRequires: python3-pytest | |
3b64f676 | 37 | BuildRequires: python3-pytest-timeout |
8d193089 | 38 | %endif |
11f148ce | 39 | %endif |
8d193089 JB |
40 | BuildRequires: rpm-pythonprov |
41 | BuildRequires: rpmbuild(macros) >= 1.714 | |
c0dad441 JB |
42 | %if %{with doc} |
43 | BuildRequires: sphinx-pdg | |
44 | %endif | |
3b64f676 | 45 | Requires: python-modules >= 1:2.7 |
11f148ce JK |
46 | BuildArch: noarch |
47 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
48 | ||
49 | %description | |
50 | execnet provides carefully tested means to ad-hoc interact with Python | |
51 | interpreters across version, platform and network barriers. It | |
52 | provides a minimal and fast API targetting the following uses: | |
8d193089 JB |
53 | - distribute tasks to local or remote processes |
54 | - write and deploy hybrid multi-process applications | |
55 | - write scripts to administer multiple hosts | |
56 | ||
57 | %description -l pl.UTF-8 | |
58 | execnet dostarcza uważnie przetestowane narzędzia do interakcji z | |
59 | interpreterami Pythona zainstalowanych w różnych wersjach, na różnych | |
60 | platformach i w różnych sieciach. Zapewnia minimalne i szybkie API | |
61 | przeznaczone do następujących zastosowań: | |
62 | - rozpraszania zadań na lokalne lub zdalne procesy | |
63 | - pisania i wdrażania wieloprocesowych aplikacji hybrydowych | |
64 | - pisania skryptów do administrowania wieloma hostami | |
11f148ce JK |
65 | |
66 | %package -n python3-%{module} | |
67 | Summary: Rapid multi-Python deployment | |
8d193089 | 68 | Summary(pl.UTF-8): Szybkie wdrożenia na wielu Pythonach |
11f148ce | 69 | Group: Libraries/Python |
440812c8 | 70 | Requires: python3-modules >= 1:3.5 |
11f148ce JK |
71 | |
72 | %description -n python3-%{module} | |
73 | execnet provides carefully tested means to ad-hoc interact with Python | |
74 | interpreters across version, platform and network barriers. It | |
75 | provides a minimal and fast API targetting the following uses: | |
8d193089 JB |
76 | - distribute tasks to local or remote processes |
77 | - write and deploy hybrid multi-process applications | |
78 | - write scripts to administer multiple hosts | |
79 | ||
80 | %description -n python3-%{module} -l pl.UTF-8 | |
81 | execnet dostarcza uważnie przetestowane narzędzia do interakcji z | |
82 | interpreterami Pythona zainstalowanych w różnych wersjach, na różnych | |
83 | platformach i w różnych sieciach. Zapewnia minimalne i szybkie API | |
84 | przeznaczone do następujących zastosowań: | |
85 | - rozpraszania zadań na lokalne lub zdalne procesy | |
86 | - pisania i wdrażania wieloprocesowych aplikacji hybrydowych | |
87 | - pisania skryptów do administrowania wieloma hostami | |
11f148ce | 88 | |
c0dad441 JB |
89 | %package apidocs |
90 | Summary: API documentation for Python execnet module | |
91 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona execnet | |
92 | Group: Documentation | |
93 | ||
94 | %description apidocs | |
95 | API documentation for Python execnet module. | |
96 | ||
97 | %description apidocs -l pl.UTF-8 | |
98 | Dokumentacja API modułu Pythona execnet. | |
99 | ||
11f148ce JK |
100 | %prep |
101 | %setup -q -n %{module}-%{version} | |
11f148ce JK |
102 | |
103 | %build | |
104 | %if %{with python2} | |
b2ae00ad | 105 | %py_build |
8d193089 JB |
106 | |
107 | %if %{with tests} | |
c0dad441 | 108 | PYTHONPATH=$(pwd) \ |
324ebba5 JB |
109 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ |
110 | PYTEST_PLUGINS="pytest_timeout" \ | |
111 | %{__python} -m pytest testing --timeout=20 | |
8d193089 | 112 | %endif |
11f148ce JK |
113 | %endif |
114 | ||
115 | %if %{with python3} | |
b2ae00ad | 116 | %py3_build |
8d193089 JB |
117 | |
118 | %if %{with tests} | |
c0dad441 | 119 | PYTHONPATH=$(pwd) \ |
324ebba5 JB |
120 | PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \ |
121 | PYTEST_PLUGINS="pytest_timeout" \ | |
122 | %{__python3} -m pytest testing --timeout=20 | |
8d193089 | 123 | %endif |
11f148ce JK |
124 | %endif |
125 | ||
c0dad441 JB |
126 | %if %{with doc} |
127 | %{__make} -C doc html | |
128 | %endif | |
129 | ||
11f148ce JK |
130 | %install |
131 | rm -rf $RPM_BUILD_ROOT | |
132 | ||
133 | %if %{with python2} | |
b2ae00ad | 134 | %py_install |
11f148ce JK |
135 | |
136 | # no %%py_postclean ! | |
137 | # the source code might be run on a remote machine | |
138 | %endif | |
139 | ||
140 | %if %{with python3} | |
b2ae00ad | 141 | %py3_install |
11f148ce JK |
142 | %endif |
143 | ||
144 | %clean | |
145 | rm -rf $RPM_BUILD_ROOT | |
146 | ||
147 | %if %{with python2} | |
148 | %files | |
149 | %defattr(644,root,root,755) | |
c0dad441 | 150 | %doc CHANGELOG.rst ISSUES.txt LICENSE README.rst |
11f148ce | 151 | %{py_sitescriptdir}/%{module} |
11f148ce JK |
152 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info |
153 | %endif | |
11f148ce JK |
154 | |
155 | %if %{with python3} | |
156 | %files -n python3-%{module} | |
157 | %defattr(644,root,root,755) | |
c0dad441 | 158 | %doc CHANGELOG.rst ISSUES.txt LICENSE README.rst |
11f148ce JK |
159 | %{py3_sitescriptdir}/%{module} |
160 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
161 | %endif | |
c0dad441 JB |
162 | |
163 | %if %{with doc} | |
164 | %files apidocs | |
165 | %defattr(644,root,root,755) | |
166 | %doc doc/_build/html/{_images,_static,example,*.html,*.js} | |
167 | %endif |