%global srcname fontdump
%global sum Dump the CSS and different formats of fonts for Google Fonts
Name: %{srcname}
Version: 1.3.0
Release: 4%{?dist}
Summary: %{sum}
License: MIT
URL: https://github.com/glasslion/fontdump
Source0: http://pypi.python.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel python3-devel
Requires: python3-fontdump
%description
A command line tool to dump the CSS and different formats of fonts for Google
Fonts, so you can serve them on your local servers.
%package -n python2-%{srcname}
Summary: %{sum}
BuildRequires: python-docopt
BuildRequires: python-cssutils
BuildRequires: python-requests
%{?python_provide:%python_provide python2-%{srcname}}
%description -n python2-%{srcname}
A command line tool to dump the CSS and different formats of fonts for Google
Fonts, so you can serve them on your local servers.
%package -n python3-%{srcname}
Summary: %{sum}
BuildRequires: python3-docopt
#BuildRequires: python3-cssutils
BuildRequires: python3-requests
%{?python_provide:%python_provide python3-%{srcname}}
%description -n python3-%{srcname}
A command line tool to dump the CSS and different formats of fonts for Google
Fonts, so you can serve them on your local servers.
%prep
%autosetup -n %{srcname}-%{version}
sed -i -e '/^#!\//, 1d' fontdump/*.py
%build
%py2_build
%py3_build
%install
# Must do the python2 install first because the scripts in /usr/bin are
# overwritten with every setup.py install, and in general we want the
# python3 version to be the default.
%py2_install
%py3_install
%check
%{__python2} setup.py test
# disable this as python3-cssutils is not in f23
#%{__python3} setup.py test
%files
%{_bindir}/%{srcname}
%files -n python2-%{srcname}
%doc PKG-INFO
%license LICENSE
%{python2_sitelib}/%{srcname}
%{python2_sitelib}/%{srcname}-%{version}-py2.*.egg-info
%files -n python3-%{srcname}
%doc PKG-INFO
%license LICENSE
%{python3_sitelib}/%{srcname}
%{python3_sitelib}/%{srcname}-%{version}-py3.*.egg-info
%changelog
* Mon Apr 04 2016 Parag Nemade <pnemade AT redhat DOT com> - 1.3.0-4
- Add python3 subpackage
- Follow new python and updated packaging guidelines
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Nov 25 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.3.0-1
- Update to new upstream 1.3.0 release
* Thu Oct 30 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.2.1-1
- Update to new upstream 1.2.1 release
* Thu Oct 30 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.2.0-2
- Add upstream LICENSE file (asked in review)
- Add Requires: python-setuptools (asked in review)
* Mon Sep 22 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.2.0-1
- Initial packaging