diff options
author | Jesus Rivero <neurogeek@gentoo.org> | 2009-03-01 08:24:02 +0000 |
---|---|---|
committer | Jesus Rivero <neurogeek@gentoo.org> | 2009-03-01 08:24:02 +0000 |
commit | 618b67786b97f2ab7afc22132f0980544c560522 (patch) | |
tree | 79dcc3a02692f5239c36243409f350f9e46c65ec /dev-python/pycrypto | |
parent | Version bump. Fixes bug #260690. (diff) | |
download | historical-618b67786b97f2ab7afc22132f0980544c560522.tar.gz historical-618b67786b97f2ab7afc22132f0980544c560522.tar.bz2 historical-618b67786b97f2ab7afc22132f0980544c560522.zip |
Version bump. Fixes bug #246406 2.6 (deprecation warnings). Thanks to Christian Becke for the patches.
Package-Manager: portage-2.2_rc20/cvs/Linux 2.6.27-gentoo-r7 i686
Diffstat (limited to 'dev-python/pycrypto')
-rw-r--r-- | dev-python/pycrypto/ChangeLog | 11 | ||||
-rw-r--r-- | dev-python/pycrypto/Manifest | 14 | ||||
-rw-r--r-- | dev-python/pycrypto/files/pycrypto-2.0.1-2.6_hashlib.patch | 93 | ||||
-rw-r--r-- | dev-python/pycrypto/pycrypto-2.0.1-r7.ebuild | 57 |
4 files changed, 172 insertions, 3 deletions
diff --git a/dev-python/pycrypto/ChangeLog b/dev-python/pycrypto/ChangeLog index 0a890d40f61e..2031efecfa56 100644 --- a/dev-python/pycrypto/ChangeLog +++ b/dev-python/pycrypto/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-python/pycrypto -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.63 2008/08/21 06:20:27 ricmm Exp $ +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/ChangeLog,v 1.64 2009/03/01 08:24:02 neurogeek Exp $ + +*pycrypto-2.0.1-r7 (01 Mar 2009) + + 01 Mar 2009; <neurogeek@gentoo.org> + +files/pycrypto-2.0.1-2.6_hashlib.patch, +pycrypto-2.0.1-r7.ebuild: + Version bump. Fixes bug #246406 2.6 (deprecation warnings). Thanks to + Christian Becke for the patches. 21 Aug 2008; Ricardo Mendoza <ricmm@gentoo.org> pycrypto-2.0.1-r5.ebuild, pycrypto-2.0.1-r6.ebuild: diff --git a/dev-python/pycrypto/Manifest b/dev-python/pycrypto/Manifest index 6b61af2f3620..d66a127c5855 100644 --- a/dev-python/pycrypto/Manifest +++ b/dev-python/pycrypto/Manifest @@ -1,3 +1,7 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +AUX pycrypto-2.0.1-2.6_hashlib.patch 2814 RMD160 e7279be6ed13476eb3a124c765557ccae11c54b7 SHA1 b1f1307d4b428eb8da0283cc8c87096cef08e746 SHA256 cfbebb94fcc932e9dd6246f3285f6f6654f60a0b88594fd9c7c598a62c02946e AUX pycrypto-2.0.1-bindist.patch 1561 RMD160 b0064385698a1cb9ed741b2e68ed682b4d395a61 SHA1 e3169e49281a1fca0ef5154bdb3b48ccc50e809d SHA256 c95a6b3628d5472f749004c5d9a95a812d1b9c1fc7bfa5a538fa64210a021d9a AUX pycrypto-2.0.1-gmp.patch 644 RMD160 33c7f7e435a1b9e76729d2083fa203a2ec040d83 SHA1 f434fea5dfacf9d95e96ba8adea2a5ce4491594f SHA256 c20f8d91ee74c4c0347957386c60b38a510c368e3778ae80f015af68c963d29d AUX pycrypto-2.0.1-ia64.patch 442 RMD160 c027362c20b414ec07e7eda9ee0002d4c75c78c4 SHA1 3cb5e684f38bac54138aaae4e13b02e2f649d38f SHA256 7ccfa05d0b5ebe9bc9a9edc40226f6bc8adbff27aaae0da70881f53afdaf506c @@ -8,5 +12,13 @@ AUX pycrypto-2.0.1-uint32.patch 1078 RMD160 40f20f4d3a89b8927eaee415418e1d9f2b2b DIST pycrypto-2.0.1.tar.gz 154292 RMD160 5ce938a24f77f414e42680c17ef9b6dc8de94a2e SHA1 c77cdefdfb06e4749690013a9a9e1600ab14e26f SHA256 b08d4ed54c9403c77778a3803e53a4f33f359b42d94f6f3e14abb1bf4941e6ea EBUILD pycrypto-2.0.1-r5.ebuild 1501 RMD160 23fcf75215bacac43de0e254d216768a14aca7aa SHA1 882cfa951483f6c304984c75f541ef8488906fda SHA256 e1cfce80ae28225522ba830ed9062123a71fe8279f31ce9096d994f34a55d3b8 EBUILD pycrypto-2.0.1-r6.ebuild 1532 RMD160 b96b870eceb138401f61bba45ef8021366da2e1c SHA1 d63f0abf22a9d3f59332e73a33fa3e1b03e7e5dc SHA256 d9fe3eac30683401eae64384b52653926c57c57945ad12ca59aba516e8fc5187 -MISC ChangeLog 8310 RMD160 522ef917fe0ea207b9ac5c1af463d4ecce00a54e SHA1 c0423fdc4787644ced58e5d7c4436884c7fbad4b SHA256 c38ea824670bc3ce2295baa09126c933e1b7bed52eecdd4f1cb0481924f06381 +EBUILD pycrypto-2.0.1-r7.ebuild 1623 RMD160 2029374d352250b8665f54f74401665ef47e2018 SHA1 1296e5fe4b93e1ce3cacc29538ddf7dc8172a47b SHA256 0483f888ea5a5fcbad467276315ca1ce2d0126f452acd4e4e983bf02954271b3 +MISC ChangeLog 8564 RMD160 497e19761dbef5900bccb6090457e3046fd7c1cb SHA1 2e5bdee2bb4d5b17d00f608e403ca346f97b39c4 SHA256 b948022b6947ba610321a7a8f036a375bbd182f75905512da9af15565067a0c4 MISC metadata.xml 1774 RMD160 b0aeda4d69c1dc4ec798f05f617a2d0ddf8c29ab SHA1 00da4a85672688868003fecd52b3a9497a3c433c SHA256 b4fe5bcbed977469f626a33c8b9c16d860e53e16b02f78ce931f6afa67c98ac2 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.9 (GNU/Linux) + +iEYEARECAAYFAkmqRkYACgkQdIssYB9vBoNs4QCfXmEIbHD3+bwJQgPrbpGxVOpD +Q+AAmweR1DdNiXEbu2Y4uUuNP1Vu/1Ak +=SHVa +-----END PGP SIGNATURE----- diff --git a/dev-python/pycrypto/files/pycrypto-2.0.1-2.6_hashlib.patch b/dev-python/pycrypto/files/pycrypto-2.0.1-2.6_hashlib.patch new file mode 100644 index 000000000000..9ee7e17eb0f6 --- /dev/null +++ b/dev-python/pycrypto/files/pycrypto-2.0.1-2.6_hashlib.patch @@ -0,0 +1,93 @@ +#From: Dwayne C. Litzenberger <dlitz@dlitz.net> +#Date: Sun, 14 Sep 2008 19:30:59 +0000 (-0400) +#Subject: Python 2.6 compatibility: When possible, use hashlib instead of the deprecated 'md5... +#X-Git-Url: http://gitweb.pycrypto.org/?p=crypto%2Fpycrypto-2.x.git;a=commitdiff_plain;h=d2311689910240e425741a546576129f4c9735e2 +# +#Python 2.6 compatibility: When possible, use hashlib instead of the deprecated 'md5' and 'sha' modules +#--- +# +#diff --git a/Hash/MD5.py b/Hash/MD5.py +#index bdbc62a..e79a85f 100644 +--- a/Hash/MD5.py ++++ b/Hash/MD5.py +@@ -3,11 +3,21 @@ + + __revision__ = "$Id: pycrypto-2.0.1-2.6_hashlib.patch,v 1.1 2009/03/01 08:24:02 neurogeek Exp $" + +-from md5 import * ++__all__ = ['new', 'digest_size'] + +-import md5 +-if hasattr(md5, 'digestsize'): +- digest_size = digestsize +- del digestsize +-del md5 ++try: ++ # The md5 module is deprecated in Python 2.6, so use hashlib when possible. ++ import hashlib ++ def new(data=""): ++ return hashlib.md5(data) ++ digest_size = new().digest_size ++ ++except ImportError: ++ from md5 import * ++ ++ import md5 ++ if hasattr(md5, 'digestsize'): ++ digest_size = digestsize ++ del digestsize ++ del md5 + +diff --git a/Hash/SHA.py b/Hash/SHA.py +index dc05502..f4128ec 100644 +--- a/Hash/SHA.py ++++ b/Hash/SHA.py +@@ -3,9 +3,19 @@ + + __revision__ = "$Id: pycrypto-2.0.1-2.6_hashlib.patch,v 1.1 2009/03/01 08:24:02 neurogeek Exp $" + +-from sha import * +-import sha +-if hasattr(sha, 'digestsize'): +- digest_size = digestsize +- del digestsize +-del sha ++__all__ = ['new', 'digest_size'] ++ ++try: ++ # The md5 module is deprecated in Python 2.6, so use hashlib when possible. ++ import hashlib ++ def new(data=""): ++ return hashlib.sha1(data) ++ digest_size = new().digest_size ++ ++except ImportError: ++ from sha import * ++ import sha ++ if hasattr(sha, 'digestsize'): ++ digest_size = digestsize ++ del digestsize ++ del sha +#From: Dwayne C. Litzenberger <dlitz@dlitz.net> +#Date: Sun, 14 Sep 2008 21:38:52 +0000 (-0400) +#Subject: Python 2.6 compatibility: Use Hash.MD5 instead of Python "md5" module in the HMAC... +#X-Git-Url: http://gitweb.pycrypto.org/?p=crypto%2Fpycrypto-2.0.x.git;a=commitdiff_plain;h=84b793416b52311643bfd456a4544444afbfb5da +# +#Python 2.6 compatibility: Use Hash.MD5 instead of Python "md5" module in the HMAC module. +#--- + +#diff --git a/Hash/HMAC.py b/Hash/HMAC.py +#index b8a9229..6ed9556 100644 +--- a/Hash/HMAC.py ++++ b/Hash/HMAC.py +@@ -33,8 +33,8 @@ class HMAC: + digestmod: A module supporting PEP 247. Defaults to the md5 module. + """ + if digestmod == None: +- import md5 +- digestmod = md5 ++ import MD5 ++ digestmod = MD5 + + self.digestmod = digestmod + self.outer = digestmod.new() diff --git a/dev-python/pycrypto/pycrypto-2.0.1-r7.ebuild b/dev-python/pycrypto/pycrypto-2.0.1-r7.ebuild new file mode 100644 index 000000000000..b57da4f3b3fc --- /dev/null +++ b/dev-python/pycrypto/pycrypto-2.0.1-r7.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/pycrypto/pycrypto-2.0.1-r7.ebuild,v 1.1 2009/03/01 08:24:02 neurogeek Exp $ + +NEED_PYTHON=2.5 +inherit distutils toolchain-funcs flag-o-matic + +DESCRIPTION="Python Cryptography Toolkit" +HOMEPAGE="http://www.amk.ca/python/code/crypto.html" +SRC_URI="http://www.amk.ca/files/python/crypto/${P}.tar.gz" + +LICENSE="freedist" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="bindist gmp test" + +RDEPEND="virtual/python + gmp? ( dev-libs/gmp )" +DEPEND="${RDEPEND} + test? ( =dev-python/sancho-0.11-r1 )" + +src_unpack() { + unpack ${A} + cd "${S}" + use bindist && epatch "${FILESDIR}"/${P}-bindist.patch + epatch "${FILESDIR}"/${P}-sha256.patch + epatch "${FILESDIR}"/${P}-sha256-2.patch + epatch "${FILESDIR}"/${P}-gmp.patch + epatch "${FILESDIR}"/${P}-uint32.patch + epatch "${FILESDIR}"/${P}-sancho-package-rename.patch + epatch "${FILESDIR}"/${P}-2.6_hashlib.patch +} + +src_compile() { + use gmp \ + && export USE_GMP=1 \ + || export USE_GMP=0 + # sha256 hashes occasionally trigger ssp when built with + # -finline-functions (implied by -O3). + gcc-specs-ssp && append-flags -fno-inline-functions + distutils_src_compile + python_need_rebuild +} + +src_test() { + export PYTHONPATH=$(ls -d "${S}"/build/lib.*/) + python ./test.py || die "test failed" + if use test ; then + local x + cd test + for x in test_*.py ; do + python ${x} || die "${x} failed" + done + fi +} + +DOCS="ACKS ChangeLog PKG-INFO README TODO Doc/pycrypt.tex" |