Don't fail on older versions of python because of buggy hashlib
This commit is contained in:
parent
8900f66cfa
commit
678e42cdf0
@ -0,0 +1,26 @@
|
|||||||
|
From f6f6666438af884da7b4b1d76a258639f949406f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeffrey C. Ollie <jeff@ocjtech.us>
|
||||||
|
Date: Thu, 2 Dec 2010 13:05:50 -0600
|
||||||
|
Subject: [PATCH] Don't fail on older python versions because of hashes.
|
||||||
|
|
||||||
|
---
|
||||||
|
dns/hash.py | 3 ---
|
||||||
|
1 files changed, 0 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dns/hash.py b/dns/hash.py
|
||||||
|
index 7bd5ae5..8582a9c 100644
|
||||||
|
--- a/dns/hash.py
|
||||||
|
+++ b/dns/hash.py
|
||||||
|
@@ -37,9 +37,6 @@ def _setup():
|
||||||
|
if sys.hexversion >= 0x02050200:
|
||||||
|
_hashes['SHA384'] = hashlib.sha384
|
||||||
|
_hashes['SHA512'] = hashlib.sha512
|
||||||
|
- else:
|
||||||
|
- _hashes['SHA384'] = _need_later_python('SHA384')
|
||||||
|
- _hashes['SHA512'] = _need_later_python('SHA512')
|
||||||
|
|
||||||
|
if sys.hexversion < 0x02050000:
|
||||||
|
# hashlib doesn't conform to PEP 247: API for
|
||||||
|
--
|
||||||
|
1.7.3.2
|
||||||
|
|
@ -20,6 +20,9 @@ License: MIT
|
|||||||
URL: http://www.dnspython.org/
|
URL: http://www.dnspython.org/
|
||||||
Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
|
Source0: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz
|
||||||
Source1: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz.asc
|
Source1: http://www.dnspython.org/kits/%{version}/dnspython-%{version}.tar.gz.asc
|
||||||
|
%if 0%{?rhel} == 5
|
||||||
|
Patch0: 0001-Don-t-fail-on-older-python-versions-because-of-hashe.patch
|
||||||
|
%endif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@ -76,6 +79,10 @@ cp -a . %{py26dir}
|
|||||||
find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python26}|'
|
find %{py26dir} -name '*.py' | xargs sed -i '1s|^#!.*python|#!%{__python26}|'
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel} == 5
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
|
CFLAGS="%{optflags}" %{__python} -c 'import setuptools; execfile("setup.py")' build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user