SHA256
1
0
forked from pool/python-sh
python-sh/python-sh.spec

70 lines
2.0 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-sh
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-sh
Version: 1.09
Release: 0
Summary: Python subprocess interface
License: MIT
Group: Development/Languages/Python
Url: https://github.com/amoffat/sh
Source0: https://github.com/amoffat/sh/archive/%{version}.tar.gz
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
BuildArch: noarch
%endif
BuildRequires: python-devel
BuildRequires: python-setuptools
%description
sh (previously pbs) is a full-fledged subprocess
replacement for Python 2.6 - 3.2 that allows you to call
any program as if it were a function:
from sh import ifconfig
print ifconfig("eth0")
sh is not a collection of system commands implemented in
Python.
%prep
%setup -q -n amoffat-sh-80af572
%build
python setup.py build
%install
python setup.py install \
--prefix=%{_prefix} \
--root=%{buildroot}
%check
python test.py
%files
%defattr(0644,root,root)
%doc AUTHORS.md CHANGELOG.md LICENSE.txt README.md
%{python_sitelib}/sh.py
%{python_sitelib}/sh.pyc
%{python_sitelib}/sh-%{version}-*.egg-info
%changelog