Blob Blame History Raw
%global srcname spur
%global sum Run commands locally or over SSH using the same interface
%global desc Run commands and manipulate files locally or over SSH using the same interface.

Name:           python-%{srcname}
Version:        0.3.17
Release:        2%{?dist}
Summary:        %{sum}

License:        BSD
URL:            http://github.com/mwilliamson/%{srcname}.py/
Source0:        https://github.com/mwilliamson/%{srcname}.py/archive/%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
Patch0:         python-spur-encode.patch
BuildArch:      noarch

%description
%{desc}

%package -n python2-%{srcname}
Summary:        %{sum}
BuildRequires:  python2-devel
BuildRequires:  python-setuptools
BuildRequires:  python-nose
BuildRequires:  python-paramiko
Requires:       python-paramiko
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
%{desc}

%package -n python%{python3_pkgversion}-%{srcname}
Summary:        %{sum}
BuildRequires:  python%{python3_pkgversion}-devel
BuildRequires:  python%{python3_pkgversion}-setuptools
BuildRequires:  python%{python3_pkgversion}-nose
BuildRequires:  python%{python3_pkgversion}-paramiko
Requires:       python%{python3_pkgversion}-paramiko
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}

%description -n python%{python3_pkgversion}-%{srcname}
%{desc}


%prep
%setup -q -n %{srcname}.py-%{version}
%patch0 -p1 -b .encode
sed -i -e "s/’/'/g" README.rst


%build
%py2_build
%py3_build


%install
%py3_install
%py2_install


%check
export LANG=en_US.UTF-8
nosetests-%{python2_version} -e ssh
nosetests-%{python3_version} -e ssh


%files -n python2-%{srcname}
%license LICENSE
%doc CHANGES CONTRIBUTING.rst README.rst
%{python2_sitelib}/%{srcname}*

%files -n python%{python3_pkgversion}-%{srcname}
%license LICENSE
%doc CHANGES CONTRIBUTING.rst README.rst
%{python3_sitelib}/%{srcname}*


%changelog
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 0.3.17-2
- Rebuild for Python 3.6

* Fri Apr 29 2016 Orion Poplawski <orion@cora.nwra.com> - 0.3.17-1
- Update to 0.3.17

* Mon Apr 25 2016 Orion Poplawski <orion@cora.nwra.com> - 0.3.16-1
- Update to 0.3.16

* Tue Apr 5 2016 Orion Poplawski <orion@cora.nwra.com> - 0.3.15-1
- Initial package