2011-06-07 23:19:53 +00:00
|
|
|
#
|
2011-06-07 23:23:10 +00:00
|
|
|
# spec file for package python-Fabric
|
2011-06-07 23:19:53 +00:00
|
|
|
#
|
2013-01-16 15:57:58 +00:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-06-07 23:19:53 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
2011-08-08 13:51:17 +00:00
|
|
|
|
2011-06-07 23:19:53 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-02-14 11:57:06 +00:00
|
|
|
|
2011-09-02 07:46:23 +00:00
|
|
|
Name: python-Fabric
|
2013-01-29 04:15:19 +00:00
|
|
|
Version: 1.5.3
|
2011-09-02 07:46:23 +00:00
|
|
|
Release: 0
|
2011-06-07 23:19:53 +00:00
|
|
|
Summary: Fabric is a simple, Pythonic tool for remote execution and deployment
|
2011-11-10 10:50:13 +00:00
|
|
|
License: BSD-2-Clause
|
2011-06-07 23:19:53 +00:00
|
|
|
Group: Development/Languages/Python
|
2012-02-20 22:17:34 +00:00
|
|
|
Url: http://fabfile.org
|
2012-04-05 04:29:09 +00:00
|
|
|
Source: Fabric-%{version}.tar.bz2
|
2011-06-07 23:19:53 +00:00
|
|
|
BuildRequires: python-devel
|
2011-06-07 23:23:10 +00:00
|
|
|
BuildRequires: python-distribute
|
2012-12-10 08:49:36 +00:00
|
|
|
# Test requirements:
|
|
|
|
#TODO: Disabled due to errors / fudge requirement
|
2012-02-21 11:38:48 +00:00
|
|
|
#BuildRequires: python-fudge
|
2012-12-10 08:49:36 +00:00
|
|
|
#BuildRequires: python-nose
|
|
|
|
# Documentation requirements:
|
|
|
|
BuildRequires: python-Sphinx
|
2012-12-10 16:18:54 +00:00
|
|
|
BuildRequires: python-paramiko >= 1.9.0
|
2011-06-07 23:23:10 +00:00
|
|
|
Requires: python-distribute
|
2012-12-10 08:49:36 +00:00
|
|
|
Requires: python-paramiko >= 1.9.0
|
2012-02-20 22:17:34 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
2011-06-07 23:19:53 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Fabric is a Python (2.5 or higher) library and command-line tool for
|
|
|
|
streamlining the use of SSH for application deployment or systems
|
|
|
|
administration tasks.
|
|
|
|
|
|
|
|
It provides a basic suite of operations for executing local or remote shell
|
2011-09-02 07:46:23 +00:00
|
|
|
commands (normally or via sudo) and uploading/downloading files, as well as
|
2011-06-07 23:19:53 +00:00
|
|
|
auxiliary functionality such as prompting the running user for input, or
|
|
|
|
aborting execution.
|
2011-09-02 07:46:23 +00:00
|
|
|
|
2011-06-07 23:19:53 +00:00
|
|
|
Typical use involves creating a Python module containing one or more functions,
|
2011-09-02 07:46:23 +00:00
|
|
|
then executing them via the fab command-line tool. Below is a small but
|
|
|
|
complete "fabfile" containing a single task:
|
2011-06-07 23:19:53 +00:00
|
|
|
|
|
|
|
from fabric.api import run
|
|
|
|
|
|
|
|
def host_type():
|
|
|
|
run('uname -s')
|
|
|
|
|
2011-09-02 07:46:23 +00:00
|
|
|
Once a task is defined, it may be run on one or more servers, like so:
|
2011-06-07 23:19:53 +00:00
|
|
|
|
|
|
|
$ fab -H localhost,linuxbox host_type
|
|
|
|
[localhost] run: uname -s
|
|
|
|
[localhost] out: Darwin
|
|
|
|
[linuxbox] run: uname -s
|
|
|
|
[linuxbox] out: Linux
|
|
|
|
|
|
|
|
Done.
|
|
|
|
Disconnecting from localhost... done.
|
|
|
|
Disconnecting from linuxbox... done.
|
|
|
|
|
2011-09-02 07:46:23 +00:00
|
|
|
In addition to use via the fab tool, Fabric's components may be imported
|
2011-06-07 23:19:53 +00:00
|
|
|
into other Python code, providing a Pythonic interface to the SSH protocol
|
|
|
|
suite at a higher level than that provided by e.g. Paramiko (which
|
|
|
|
Fabric itself leverages.)
|
|
|
|
|
|
|
|
%prep
|
2011-09-02 07:46:23 +00:00
|
|
|
%setup -q -n Fabric-%{version}
|
2012-12-10 08:49:36 +00:00
|
|
|
#sed -i "s|fudge<1.0|fudge|" setup.py # Try testing with newer fudge
|
2011-06-07 23:19:53 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
2012-12-10 16:18:54 +00:00
|
|
|
python setup.py build_sphinx && rm -r build/sphinx/html/.buildinfo
|
2011-06-07 23:19:53 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
2012-02-21 09:05:00 +00:00
|
|
|
#%%check
|
|
|
|
#python setup.py test
|
2012-02-20 22:17:34 +00:00
|
|
|
|
2011-06-07 23:19:53 +00:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2012-12-10 16:18:54 +00:00
|
|
|
%doc AUTHORS LICENSE README.rst build/sphinx/html
|
2011-06-07 23:23:10 +00:00
|
|
|
%{_bindir}/fab
|
|
|
|
%{python_sitelib}/*
|
2011-06-07 23:19:53 +00:00
|
|
|
|
|
|
|
%changelog
|