Blob Blame History Raw
%global srcname backports.shutil_get_terminal_size
%global fedname backports-shutil_get_terminal_size
%global sum A backport of the get_terminal_size function from Python 3.3's shutil

Name:           python-%{fedname}
Version:        1.0.0
Release:        1%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://github.com/chrippa/%{srcname}
Source0:        https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python2-pytest

%description
A backport of the get_terminal_size function from Python 3.3’s shutil.
Unlike the original version it is written in pure Python rather than C,
so it might be a tiny bit slower.

%package -n python2-%{fedname}
Summary:        %{sum}
Requires:       python-backports
%{?python_provide:%python_provide python2-%{fedname}}

%description -n python2-%{fedname}
A backport of the get_terminal_size function from Python 3.3’s shutil.
Unlike the original version it is written in pure Python rather than C,
so it might be a tiny bit slower.


%prep
%autosetup -n %{srcname}-%{version}

%build
%py2_build

%install
%py2_install

# This files are provided by python-backports
rm -f %{buildroot}%{python2_sitelib}/backports/__init__.py*

%check
py.test-2


%files -n python2-%{fedname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info
%{python2_sitelib}/backports/shutil_get_terminal_size

    
%changelog
* Thu Jun 23 2016 Dominika Krejci <dkrejci@redhat.com> - 1.0.0-1
- Initial release