%global module_name freetype
%global sum Freetype python bindings
Name: python-%{module_name}
Version: 1.0.2
Release: 1%{?dist}
Summary: Freetype python bindings
License: BSD
URL: https://github.com/rougier/freetype-py
Source0: https://github.com/rougier/freetype-py/archive/v%{version}.tar.gz
BuildArch: noarch
BuildRequires: freetype
%description
Freetype python bindings.
%package -n python2-%{module_name}
Summary: %{sum}
%{?python_provide:%python_provide python2-%{module_name}}
BuildRequires: python2-devel
BuildRequires: python-setuptools
%description -n python2-%{module_name}
%{sum}.
%package -n python3-%{module_name}
Summary: %{sum}
%{?python_provide:%python_provide python3-%{module_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-%{module_name}
%{sum}.
%prep
%autosetup -n %{module_name}-py-%{version}
sed -i '1{\@^#!/usr/bin/env python@d}' freetype/*.py
sed -i '1{\@^#!/usr/bin/env python@d}' examples/*.py
%build
%py2_build
%py3_build
%install
%py2_install
%py3_install
%check
%{__python2} setup.py test
%{__python3} setup.py test
%files -n python2-%{module_name}
%doc examples
%license LICENSE.txt
%{python2_sitelib}/%{module_name}/
%{python2_sitelib}/%{module_name}_py-%{version}-py2.?.egg-info
%files -n python3-%{module_name}
%doc examples
%license LICENSE.txt
%{python3_sitelib}/%{module_name}/
%{python3_sitelib}/%{module_name}_py-%{version}-py3.*.egg-info
%changelog
* Sat Sep 03 2016 Parag Nemade <pnemade AT redhat DOT com> - 1.0.2-1
- Update to 1.0.2
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-5
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Thu Feb 12 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.1-1
- update to 1.0.1
* Wed Nov 05 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.5.1-1
- update to 0.5.1
- Don't use Pypi as source URL as it contains wrong 1.0 tarball
- remove the removal of line 15 from setup.py as no data_files now
* Sun Nov 02 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.4.2-3
- enable python3 subpackage
* Fri Oct 24 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.4.2-2
- License is BSD not MIT
* Mon Sep 22 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.4.2-1
- Initial packaging