File sh.spec of Package sh
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%define src_name sh
%define name python-sh
%define version 1.09
%define release 1
Summary: Python subprocess interface
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://pypi.python.org/packages/source/s/%{src_name}/%{src_name}-%{version}.tar.gz
License: MIT
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Url: http://amoffat.github.com/sh/
Requires: python >= 2.6
BuildRequires: python >= 2.6
%description
sh (previously [pbs](http://pypi.python.org/pypi/pbs)) is a full-fledged
subprocess interface for Python 2.6 - 3.2 that allows you to call any program
as if it were a function:
`python from sh import ifconfig print ifconfig("eth0") `
sh is not a collection of system commands implemented in Python.
Complete documentation @ http://amoffat.github.com/sh
%prep
%setup -n %{src_name}-%{version}
%build
python setup.py build
%install
python setup.py install -O1 --root=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS.md LICENSE.txt README.md
%{python_sitelib}/*