From d6dda1590472f2c962f4409faa66aedd50016183 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Apr 06 2016 02:32:22 +0000 Subject: Enable python3 builds for EPEL7 --- diff --git a/python-ecdsa.spec b/python-ecdsa.spec index cf45c3b..f0a990f 100644 --- a/python-ecdsa.spec +++ b/python-ecdsa.spec @@ -1,4 +1,4 @@ -%if 0%{?rhel} && 0%{?rhel} <= 7 +%if 0%{?rhel} && 0%{?rhel} < 7 %{!?__python2: %global __python2 /usr/bin/python2} %{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} @@ -10,7 +10,7 @@ Name: python-%{srcname} Version: 0.13 -Release: 3%{?dist} +Release: 4%{?dist} Summary: ECDSA cryptographic signature library License: MIT @@ -18,15 +18,18 @@ URL: https://pypi.python.org/pypi/ecdsa Source0: https://pypi.python.org/packages/source/e/%{srcname}/%{srcname}-%{version}.tar.gz # Fedora's openssl does not support 192 and 224 bit keys, so don't test against that Patch0: python-ecdsa-noweak.patch +# RHEL7's openssl does not support secp256k1, so don't test against that +# https://bugzilla.redhat.com/show_bug.cgi?id=1324263 +Patch1: python-ecdsa-nosecp256k1.patch BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-six %if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-six +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools +BuildRequires: python%{python3_pkgversion}-six %endif # For tests BuildRequires: openssl @@ -53,12 +56,12 @@ and signatures are very short, making them easy to handle and incorporate into other protocols. %if 0%{?with_python3} -%package -n python3-%{srcname} +%package -n python%{python3_pkgversion}-%{srcname} Summary: ECDSA cryptographic signature library -Requires: python3-six -%{?python_provide:%python_provide python3-%{srcname}} +Requires: python%{python3_pkgversion}-six +%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} -%description -n python3-%{srcname} +%description -n python%{python3_pkgversion}-%{srcname} This is an easy-to-use implementation of ECDSA cryptography (Elliptic Curve Digital Signature Algorithm), implemented purely in Python, released under the MIT license. With this library, you can quickly create keypairs (signing @@ -71,6 +74,9 @@ into other protocols. %prep %setup -q -n %{srcname}-%{version} %patch0 -p1 -b .noweak +%if 0%{?rhel} == 7 +%patch1 -p1 -b .nosecp256k1 +%endif rm -rf %{srcname}.egg-info # Remove extraneous #! find ecdsa -name \*.py | xargs sed -ie '/\/usr\/bin\/env/d' @@ -108,13 +114,16 @@ rm ecdsa/six.py %{python2_sitelib}/* %if 0%{?with_python3} -%files -n python3-%{srcname} +%files -n python%{python3_pkgversion}-%{srcname} %doc LICENSE NEWS PKG-INFO README.md %{python3_sitelib}/* %endif # with_python3 %changelog +* Tue Apr 5 2016 Orion Poplawski - 0.13-4 +- Enable python3 builds for EPEL7 + * Sat Feb 13 2016 Orion Poplawski - 0.13-3 - Fix provide typo