From owner-freebsd-python@FreeBSD.ORG Sat Mar 8 07:20:28 2014 Return-Path: Delivered-To: python@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51093E93; Sat, 8 Mar 2014 07:20:28 +0000 (UTC) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A5CCE39E; Sat, 8 Mar 2014 07:20:27 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id mc6so3388436lab.41 for ; Fri, 07 Mar 2014 23:20:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RI907vLv8pi13CPxz3gZXHhN+BkaYa4ZYC/1tMoYnuM=; b=wtlGpBOSnFaz9fHMobGnvzoB9iPxrqmFUQqoh4bsE4ck7MkqFXHa288wZC5AQsP7/g mDy5aCgCb5YgdUof0fSm1KAl4XwRCOU+EGep0Ps2aAQgjPHUgylQLM9x7NytOIkIa2RM pVeUtaua7qVCBkLUm1yX2Lvhv/vFGp6OiJ/cSUS4k/p4R/pCo+ABPEDNraDjOjOFFqkx tnacaOHKIh8021nBvTyfAxm9UlFU/sdYrc+IA2yncS/p666cK5cpvYEBshEcfU01NkgV lguwCFAFW269Atdx7CPY5g3NqLpGKdSSeoJN9EBJpxMXolOw8DbmmFP4op+bw5m9LFY6 dLhA== MIME-Version: 1.0 X-Received: by 10.112.137.5 with SMTP id qe5mr14102714lbb.16.1394263225735; Fri, 07 Mar 2014 23:20:25 -0800 (PST) Received: by 10.152.37.131 with HTTP; Fri, 7 Mar 2014 23:20:25 -0800 (PST) In-Reply-To: <531ABBE3.9080809@FreeBSD.org> References: <20140308050804.A430920106@smtp.hushmail.com> <531ABBE3.9080809@FreeBSD.org> Date: Sat, 8 Mar 2014 08:20:25 +0100 Message-ID: Subject: Re: security/py-cryptography broken From: Olivier Duchateau To: Kubilay Kocak Content-Type: text/plain; charset=ISO-8859-1 Cc: "Kenta S." , python@freebsd.org X-BeenThere: freebsd-python@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: FreeBSD-specific Python issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2014 07:20:28 -0000 2014-03-08 7:42 GMT+01:00 Kubilay Kocak : > On 8/03/2014 4:08 PM, Kenta S. wrote: >> Trying to install deluge. >> >> ValueError: unsupported hash type sha512 >> running build >> Traceback (most recent call last): >> File "", line 1, in >> File "setup.py", line 131, in >> "test": PyTest, >> File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup >> dist.run_commands() >> File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands >> self.run_command(cmd) >> File "/usr/local/lib/python2.7/distutils/dist.py", line 971, in run_command >> cmd_obj.ensure_finalized() >> File "/usr/local/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized >> self.finalize_options() >> File "setup.py", line 59, in finalize_options >> from cryptography.hazmat.primitives import constant_time, padding >> File "cryptography/hazmat/primitives/constant_time.py", line 25, in >> """) >> File "/usr/local/lib/python2.7/site-packages/cffi/api.py", line 102, in cdef >> self._parser.parse(csource, override=override) >> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 154, in parse >> self._internal_parse(csource) >> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 159, in _internal_parse >> ast, macros = self._parse(csource) >> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 124, in _parse >> ast = _get_parser().parse(csource) >> File "/usr/local/lib/python2.7/site-packages/cffi/cparser.py", line 31, in _get_parser >> _parser_cache = pycparser.CParser() >> File "/usr/local/lib/python2.7/site-packages/pycparser/c_parser.py", line 103, in __init__ >> tabmodule=yacctab) >> File "/usr/local/lib/python2.7/site-packages/pycparser/ply/yacc.py", line 3065, in yacc >> signature = pinfo.signature() >> File "/usr/local/lib/python2.7/site-packages/pycparser/ply/yacc.py", line 2800, in signature >> from md5 import md5 >> File "/usr/local/lib/python2.7/md5.py", line 10, in >> from hashlib import md5 >> ImportError: cannot import name md5 >> *** [do-build] Error code 1 >> >> Stop in /usr/ports/security/py-cryptography. >> >> ===>>> make failed for security/py-cryptography >> ===>>> Aborting update >> > > deluge depends on py-openssl, which since 0.14, uses py-cryptography > > Having said that, it looks like your Python installation doesnt have > md5, which will be the root-cause of the issue above. > > You'll want to isolate why that is the case. It's strange, hashlib is standard module, and md5 needs to be imported like that: from hashlib import md5 (see [1]) It's perhaps problem from deluge? [1] http://hg.python.org/cpython/file/52256a5861fa/Lib/md5.py > -- > Koobs > _______________________________________________ > freebsd-python@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-python > To unsubscribe, send any mail to "freebsd-python-unsubscribe@freebsd.org" -- olivier