3
0
Fork 0
forked from mirrors/nixpkgs

fix gevent/eventlet on python 2.7.9, fixes #5782

This commit is contained in:
Domen Kožar 2015-01-17 14:14:35 +01:00
parent ca6434dcaa
commit c611f5837c
2 changed files with 34 additions and 9 deletions

View file

@ -0,0 +1,28 @@
Index: b/gevent/ssl.py
===================================================================
--- a/gevent/ssl.py
+++ b/gevent/ssl.py
@@ -81,15 +81,14 @@ class SSLSocket(socket):
self._sslobj = None
else:
# yes, create the SSL object
- if ciphers is None:
- self._sslobj = _ssl.sslwrap(self._sock, server_side,
- keyfile, certfile,
- cert_reqs, ssl_version, ca_certs)
- else:
- self._sslobj = _ssl.sslwrap(self._sock, server_side,
- keyfile, certfile,
- cert_reqs, ssl_version, ca_certs,
- ciphers)
+ ctx = SSLContext(ssl_version)
+ if keyfile or certfile:
+ ctx.load_cert_chain(certfile, keyfile)
+ if ca_certs:
+ ctx.load_verify_locations(ca_certs)
+ if ciphers:
+ ctx.set_ciphers(ciphers)
+ self._sslobj = ctx._wrap_socket(self._sock, server_side=server_side)
if do_handshake_on_connect:
self.do_handshake()
self.keyfile = keyfile

View file

@ -3973,23 +3973,18 @@ let
};
};
eventlet = buildPythonPackage rec {
name = "eventlet-0.15.1";
name = "eventlet-0.16.1";
src = pkgs.fetchurl {
url = "http://pypi.python.org/packages/source/e/eventlet/${name}.tar.gz";
md5 = "7155780824bb6344651a573838416f21";
md5 = "58f6e5cd1bcd8ab78e32a2594aa0abad";
};
buildInputs = with self; [ nose httplib2 ];
buildInputs = with self; [ nose httplib2 pyopenssl ];
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];
PYTHON_EGG_CACHE = "`pwd`/.egg-cache";
doCheck = false; # !!! fix; tests access the network
meta = {
homepage = http://pypi.python.org/pypi/eventlet/;
description = "A concurrent networking library for Python";
@ -4326,7 +4321,7 @@ let
sha256 = "16cddyk5is0gjfn0ia5n2l4lhdzvbjzlx6sfpy7ddjd3d3fq7ckl";
};
propagatedBuildInputs = with self; [ twisted self.pyopenssl ];
propagatedBuildInputs = [ self.twisted self.pyopenssl ];
meta = {
homepage = http://foolscap.lothar.com/;
@ -4484,6 +4479,8 @@ let
url = "https://pypi.python.org/packages/source/g/gevent/${name}.tar.gz";
sha256 = "0hyzfb0gcx9pm5c2igan8y57hqy2wixrwvdjwsaivxsqs0ay49s6";
};
patches = [ ../development/python-modules/gevent_sslwrap.patch ];
buildInputs = with self; [ pkgs.libev ];
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];