From 8adb46fbac99aec64a06f460ebee1095e2c5770d Mon Sep 17 00:00:00 2001 From: Athos Ribeiro Date: Mar 20 2017 20:16:23 +0000 Subject: Provide python 2 and 3 subpackages --- diff --git a/.gitignore b/.gitignore index bd7eb99..94aac94 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ fontMath-0.2.tar.gz +/fontMath-0.4.3.tar.gz diff --git a/python-fontMath.spec b/python-fontMath.spec index 3b73d00..ea9d58a 100644 --- a/python-fontMath.spec +++ b/python-fontMath.spec @@ -1,50 +1,86 @@ -%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} -%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif - -Name: python-fontMath -Version: 0.2 -Release: 13%{?dist} +%global srcname fontMath + +Name: python-%{srcname} +Version: 0.4.3 +Release: 1%{?dist} Summary: A set of objects for performing math operations on font data Group: Development/Tools License: MIT -URL: http://code.typesupply.com/wiki/FontMath -Source0: http://tools.typesupply.com/downloads/sourcecode/fontMath-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +URL: https://pypi.python.org/pypi/%{srcname} +Source0: https://github.com/typesupply/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python-devel python-robofab -Requires: python-robofab %description A set of objects for performing math operations on font data. + +%package -n python2-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python2-%{srcname}} + +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python2-pytest +BuildRequires: python2-pytest-runner +BuildRequires: python2-fonttools +BuildRequires: python2-ufolib +Requires: python2-fonttools +Requires: python2-ufolib + +%description -n python2-%{srcname} +A set of objects for performing math operations on font data. + + +%package -n python3-%{srcname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{srcname}} + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pytest +BuildRequires: python3-pytest-runner +BuildRequires: python3-fonttools +BuildRequires: python3-ufolib +Requires: python3-fonttools +Requires: python3-ufolib + +%description -n python3-%{srcname} +A set of objects for performing math operations on font data. + + %prep -%setup -q -n fontMath-%{version} +%autosetup -n %{srcname}-%{version} %build -%{__python} setup.py build - +%py2_build +%py3_build %install -rm -rf $RPM_BUILD_ROOT -%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT - +%py2_install +%py3_install -%clean -rm -rf $RPM_BUILD_ROOT +%check +%{__python2} setup.py test +%{__python3} setup.py test +%files -n python2-%{srcname} +%license License.txt +%{python2_sitelib}/%{srcname} +%{python2_sitelib}/%{srcname}-%{version}*.egg-info -%files -%defattr(-,root,root,-) -%doc License.txt -%{python_sitelib}/fontMath -%{python_sitelib}/fontMath-%{version}*.egg-info +%files -n python3-%{srcname} +%license License.txt +%{python3_sitelib}/%{srcname} +%{python3_sitelib}/%{srcname}-%{version}*.egg-info %changelog +* Sun Mar 19 2017 Athos Ribeiro - 0.4.3-1 +- New version +- Add python2 and python3 subpackages + * Sat Feb 11 2017 Fedora Release Engineering - 0.2-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild diff --git a/sources b/sources index 3dc04dd..eacabbd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -739ecc87c553180c4978c110230be6f7 fontMath-0.2.tar.gz +SHA512 (fontMath-0.4.3.tar.gz) = ef124135bae0b275701893d5d5d887443f49777a64120b78bf989da405bbd8cfb1a4827caf4b8c838a205c6a6891c127a03befb5933ccca86ff5bbdad5141b02