security/py-cryptography broken

Olivier Duchateau duchateau.olivier at gmail.com
Sat Mar 8 07:20:28 UTC 2014


2014-03-08 7:42 GMT+01:00 Kubilay Kocak <koobs.freebsd at gmail.com>:
> 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 "<string>", line 1, in <module>
>>   File "setup.py", line 131, in <module>
>>     "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 <module>
>>     """)
>>   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 <module>
>>     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 at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-python
> To unsubscribe, send any mail to "freebsd-python-unsubscribe at freebsd.org"



-- 
olivier


More information about the freebsd-python mailing list