%global srcname tate_bilinear_pairing %global sum Python library for calculating Tate bi-linear pairing Summary: %{sum} Name: python-%{srcname} Version: 0.6 Release: 1%{?dist} License: LGPLv2+ Group: Development/Languages Source: https://pypi.python.org/packages/source/t/%{srcname}/%{srcname}-%{version}.tar.gz URL: http://pypi.python.org/pypi/%{srcname}/ # Add utf8 encoding header to documentation # Email sent to upstream developer 03 Oct 2015 Patch0: python-%{srcname}-fix-header-encoding.patch # Package description contains non-ASCII characters and should be read as utf8 # Email sent to upstream developer 03 Oct 2015 Patch1: python-%{srcname}-fix-read-utf8.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python3-devel %description A Python library for calculating Tate bi-linear pairing that follows the paper by Beuchat et al. (2008). This package is also for calculating the addition of two elements in the elliptic curve group, and the addition of $k$ identical element in the elliptic curve group. %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} A Python2 library for calculating Tate bi-linear pairing that follows the paper by Beuchat et al. (2008). This package is also for calculating the addition of two elements in the elliptic curve group, and the addition of $k$ identical element in the elliptic curve group. %package -n python3-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} A Python3 library for calculating Tate bi-linear pairing that follows the paper by Beuchat et al. (2008). This package is also for calculating the addition of two elements in the elliptic curve group, and the addition of $k$ identical element in the elliptic curve group. %prep %autosetup -n %{srcname}-%{version} -p1 %build %py2_build %if 0%{?fedora} > 21 %py3_build %endif %if 0%{?fedora} == 21 %{__python3} setup.py build %endif %check %{__python2} -m unittest discover %{__python3} -m unittest discover %install %py2_install %if 0%{?fedora} > 21 %py3_install %endif %if 0%{?fedora} == 21 %{__python3} setup.py install --skip-build --prefix=%{_prefix} --root %{buildroot} %endif %files -n python2-%{srcname} %exclude %{python2_sitelib}/tests %doc README %{python2_sitelib}/* %files -n python3-%{srcname} %exclude %{python3_sitelib}/tests %doc README %{python3_sitelib}/* %changelog * Sat Oct 03 2015 Philip Worrall - 0.6-1 - Initial package