70a847
%global upstream_name blessings
70a847
d19d09
%if 0%{?fedora}
70a847
%bcond_without python3
70a847
%else
70a847
%bcond_with python3
70a847
%endif
70a847
70a847
Name:           python-%{upstream_name}
70a847
Version:        1.5
8bce4b
Release:        5%{?dist}
70a847
Summary:        Python library for terminal coloring, styling, and positioning
70a847
License:        MIT
70a847
URL:            https://github.com/erikrose/blessings
70a847
Source0:        http://pypi.python.org/packages/source/b/%{upstream_name}/%{upstream_name}-%{version}.tar.gz
70a847
# https://github.com/erikrose/blessings/issues/25
70a847
Patch0:         blessings-1.5-tests-without-tty.patch
70a847
BuildArch:      noarch
70a847
BuildRequires:  python2-devel
70a847
BuildRequires:  python-setuptools
70a847
BuildRequires:  python-nose
70a847
%if %{with python3}
70a847
BuildRequires:  python3-devel
70a847
BuildRequires:  python3-setuptools
70a847
BuildRequires:  python3-nose
70a847
%endif
70a847
70a847
%description
70a847
Blessings is a thin, practical wrapper around terminal coloring, styling, and 
70a847
positioning in Python.
70a847
70a847
%if %{with python3}
70a847
%package -n python3-%{upstream_name}
70a847
Summary:        Python library for terminal coloring, styling, and positioning
70a847
70a847
%description -n python3-%{upstream_name}
70a847
Blessings is a thin, practical wrapper around terminal coloring, styling, and 
70a847
positioning in Python.
70a847
%endif
70a847
70a847
%prep
70a847
%setup -q -n %{upstream_name}-%{version}
70a847
%patch0 -p1
70a847
rm -rf blessings.egg-info
70a847
70a847
%if %{with python3}
70a847
rm -rf %{py3dir}
70a847
cp -a . %{py3dir}
70a847
%endif
70a847
70a847
%build
70a847
%{__python} setup.py build
70a847
70a847
%if %{with python3}
70a847
pushd %{py3dir}
70a847
%{__python3} setup.py build
70a847
popd
70a847
%endif
70a847
70a847
%install
70a847
%if %{with python3}
70a847
pushd %{py3dir}
70a847
%{__python3} setup.py install --skip-build --root %{buildroot}
70a847
popd
70a847
%endif
70a847
70a847
%{__python} setup.py install --skip-build --root %{buildroot}
70a847
70a847
%check
70a847
%{__python} setup.py test
70a847
70a847
%if %{with python3}
70a847
pushd %{py3dir}
8029c6
nosetests-%{python3_version} build/lib
70a847
%endif
70a847
70a847
%files
70a847
%doc README.rst LICENSE
70a847
%{python_sitelib}/blessings
70a847
%{python_sitelib}/blessings*.egg-info
70a847
70a847
%if %{with python3}
70a847
%files -n python3-%{upstream_name}
70a847
%doc README.rst LICENSE
70a847
%{python3_sitelib}/blessings
70a847
%{python3_sitelib}/blessings*.egg-info
70a847
%endif
70a847
70a847
%changelog
8bce4b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-5
8bce4b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8bce4b
8029c6
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.5-4
8029c6
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
8029c6
f7087a
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-3
f7087a
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f7087a
858964
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5-2
858964
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
858964
70a847
* Fri Nov 30 2012 Dan Callaghan <dcallagh@redhat.com> - 1.5-1
70a847
- initial version