]>
Commit | Line | Data |
---|---|---|
261cf1fa JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module remoto | |
7 | Summary: Execute remote commands or processes | |
a13c7aa2 | 8 | Summary(pl.UTF-8): Uruchamianie zdalnych poleceń lub procesów |
261cf1fa JK |
9 | Name: python-%{module} |
10 | Version: 0.0.25 | |
6a9b9874 | 11 | Release: 10 |
261cf1fa JK |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | Source0: https://pypi.python.org/packages/source/r/remoto/%{module}-%{version}.tar.gz | |
15 | # Source0-md5: 94fa964c08d9c4619ef63201c58091e3 | |
16 | URL: https://github.com/alfredodeza/remoto | |
17 | BuildRequires: rpm-pythonprov | |
73daae8d | 18 | BuildRequires: rpmbuild(macros) >= 1.714 |
261cf1fa | 19 | %if %{with python2} |
73daae8d | 20 | BuildRequires: python-setuptools >= 1:7.0 |
261cf1fa JK |
21 | %endif |
22 | %if %{with python3} | |
23 | BuildRequires: python3-modules | |
73daae8d | 24 | BuildRequires: python3-setuptools >= 1:7.0 |
261cf1fa JK |
25 | %endif |
26 | Requires: python-execnet | |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | A very simplistic remote-command-executor using ssh and Python in the | |
32 | remote end. | |
33 | ||
34 | All the heavy lifting is done by execnet, while this minimal API | |
35 | provides the bare minimum to handle easy logging and connections from | |
36 | the remote end. | |
37 | ||
a13c7aa2 JB |
38 | %description -l pl.UTF-8 |
39 | Bardzo proste narzędzie do uruchamiania zdalnych poleceń przez SSH z | |
40 | Pythonem po drugiej stronie. | |
41 | ||
42 | Cała ciężka robota jest wykonywana przez execnet, a ten moduł jest | |
43 | minimalnym API zapewniającym minimum do obsługi łatwego logowania i | |
44 | połączeń ze zdalnej strony. | |
45 | ||
261cf1fa JK |
46 | %package -n python3-%{module} |
47 | Summary: Execute remote commands or processes | |
a13c7aa2 | 48 | Summary(pl.UTF-8): Uruchamianie zdalnych poleceń lub procesów |
261cf1fa JK |
49 | Group: Libraries/Python |
50 | Requires: python3-execnet | |
51 | ||
52 | %description -n python3-%{module} | |
53 | A very simplistic remote-command-executor using ssh and Python in the | |
54 | remote end. | |
55 | ||
56 | All the heavy lifting is done by execnet, while this minimal API | |
57 | provides the bare minimum to handle easy logging and connections from | |
58 | the remote end. | |
59 | ||
a13c7aa2 JB |
60 | %description -n python3-%{module} -l pl.UTF-8 |
61 | Bardzo proste narzędzie do uruchamiania zdalnych poleceń przez SSH z | |
62 | Pythonem po drugiej stronie. | |
63 | ||
64 | Cała ciężka robota jest wykonywana przez execnet, a ten moduł jest | |
65 | minimalnym API zapewniającym minimum do obsługi łatwego logowania i | |
66 | połączeń ze zdalnej strony. | |
67 | ||
261cf1fa JK |
68 | %prep |
69 | %setup -q -n %{module}-%{version} | |
70 | ||
71 | %build | |
72 | export REMOTO_NO_VENDOR=1 | |
73 | %if %{with python2} | |
7c91f9b5 | 74 | %py_build |
261cf1fa JK |
75 | %endif |
76 | ||
77 | %if %{with python3} | |
7c91f9b5 | 78 | %py3_build |
261cf1fa JK |
79 | %endif |
80 | ||
81 | %install | |
82 | rm -rf $RPM_BUILD_ROOT | |
83 | ||
84 | export REMOTO_NO_VENDOR=1 | |
85 | %if %{with python2} | |
7c91f9b5 | 86 | %py_install |
261cf1fa JK |
87 | # no %%py_postclean ! |
88 | # remoto needs the source code to run it on the target | |
89 | %endif | |
90 | ||
91 | %if %{with python3} | |
7c91f9b5 | 92 | %py3_install |
261cf1fa JK |
93 | %endif |
94 | ||
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc README.rst | |
102 | %{py_sitescriptdir}/%{module} | |
103 | %if "%{py_ver}" > "2.4" | |
104 | %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
105 | %endif | |
106 | %endif | |
107 | ||
108 | %if %{with python3} | |
109 | %files -n python3-%{module} | |
110 | %defattr(644,root,root,755) | |
111 | %doc README.rst | |
112 | %{py3_sitescriptdir}/%{module} | |
113 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
114 | %endif |