diff --git a/fontdump.spec b/fontdump.spec index 3cb1c62..00b416c 100644 --- a/fontdump.spec +++ b/fontdump.spec @@ -1,42 +1,85 @@ -Name: fontdump +%global srcname fontdump +%global sum Dump the CSS and different formats of fonts for Google Fonts + +Name: %{srcname} Version: 1.3.0 -Release: 3%{?dist} -Summary: Dump the CSS and different formats of fonts for Google Fonts +Release: 4%{?dist} +Summary: %{sum} License: MIT URL: https://github.com/glasslion/fontdump -Source0: https://pypi.python.org/packages/source/f/%{name}/%{name}-%{version}.tar.gz +Source0: http://pypi.python.org/packages/source/f/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools -Requires: python-setuptools +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. -%prep -%setup -q -n %{name}-%{version} -rm -rf *.egg-info +%package -n python2-%{srcname} +Summary: %{sum} +BuildRequires: python2-docopt +BuildRequires: python2-cssutils +BuildRequires: python2-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}} -sed -i -e '/^#!\//, 1d' fontdump/cli.py fontdump/core.py +%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. -find -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python2}|' +%prep +%autosetup -n %{srcname}-%{version} +sed -i -e '/^#!\//, 1d' fontdump/*.py %build -%{__python2} setup.py build +%py2_build +%py3_build %install -%{__python2} setup.py install --skip-build --root=%{buildroot} +# 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 +%{__python3} setup.py test %files -%doc PKG-INFO LICENSE -%{_bindir}/%{name} -%{python2_sitelib}/%{name}/ -%{python2_sitelib}/%{name}-%{version}-py2.*.egg-info +%{_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 - 1.3.0-4 +- Add python3 subpackage +- Follow new python and updated packaging guidelines + * Wed Feb 03 2016 Fedora Release Engineering - 1.3.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild