]>
Commit | Line | Data |
---|---|---|
7127e6a8 AM |
1 | # Conditional build: |
2 | %bcond_without tests # unit tests | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module fabric | |
7 | %define egg_name fabric | |
8 | %define pypi_name fabric | |
9 | Summary: Execute shell commands remotely over SSH, yielding useful Python objects in return | |
10 | Name: python-%{module} | |
11 | Version: 2.5.0 | |
249645d1 | 12 | Release: 4 |
7127e6a8 AM |
13 | License: - (enter GPL/GPL v2/GPL v3/LGPL/BSD/BSD-like/other license name here) |
14 | Group: Libraries/Python | |
15 | Source0: https://pypi.debian.net/fabric/%{pypi_name}-%{version}.tar.gz | |
16 | # Source0-md5: de403c610dc1dd0f7c3e7ad46c620c33 | |
17 | URL: http://www.fabfile.org/ | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
21 | BuildRequires: python-modules | |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-invoke | |
25 | BuildRequires: python-paramiko | |
26 | %endif | |
27 | %endif | |
28 | %if %{with python3} | |
29 | BuildRequires: python3-modules | |
30 | BuildRequires: python3-setuptools | |
31 | %if %{with tests} | |
32 | BuildRequires: python3-invoke | |
33 | BuildRequires: python3-paramiko | |
34 | %endif% | |
35 | %endif | |
36 | Requires: python-modules | |
37 | BuildArch: noarch | |
38 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
39 | ||
40 | %description | |
41 | Fabric is a high level library designed to execute shell commands | |
42 | remotely over SSH, yielding useful Python objects in return. | |
43 | ||
44 | %package -n python3-%{module} | |
45 | Summary: Execute shell commands remotely over SSH, yielding useful Python objects in return | |
46 | Summary(pl.UTF-8): - | |
47 | Group: Libraries/Python | |
48 | Requires: python3-modules | |
49 | ||
50 | %description -n python3-%{module} | |
51 | Fabric is a high level library designed to execute shell commands | |
52 | remotely over SSH, yielding useful Python objects in return. | |
53 | ||
54 | %prep | |
55 | %setup -q -n %{pypi_name}-%{version} | |
56 | ||
57 | %build | |
58 | %if %{with python2} | |
59 | %py_build %{?with_tests:test} | |
60 | %endif | |
61 | ||
62 | %if %{with python3} | |
63 | %py3_build %{?with_tests:test} | |
64 | %endif | |
65 | ||
66 | %install | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %if %{with python2} | |
70 | %py_install | |
71 | %endif | |
72 | ||
73 | %if %{with python3} | |
74 | %py3_install | |
75 | %endif | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %if %{with python2} | |
81 | %files | |
82 | %defattr(644,root,root,755) | |
83 | %doc README.rst | |
84 | %{py_sitescriptdir}/%{module} | |
85 | %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info | |
86 | %endif | |
87 | ||
88 | %if %{with python3} | |
89 | %files -n python3-%{module} | |
90 | %defattr(644,root,root,755) | |
91 | %doc README.rst | |
92 | %attr(755,root,root) %{_bindir}/fab | |
93 | %{py3_sitescriptdir}/%{module} | |
94 | %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info | |
95 | %endif |