mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 07:13:23 +01:00
gevent: 1.0.1 -> 1.0.2
This commit is contained in:
parent
85e82df103
commit
42d9fe8b09
2 changed files with 2 additions and 53 deletions
|
@ -1,49 +0,0 @@
|
||||||
From 485cebc4d9bab2dae51cf29f91fad2f1cf157fec Mon Sep 17 00:00:00 2001
|
|
||||||
From: Eugene Pankov <john.pankov@gmail.com>
|
|
||||||
Date: Sun, 21 Sep 2014 12:04:13 +0300
|
|
||||||
Subject: [PATCH] Work around missing sslwrap in Python 2.7.9 (fixes #477)
|
|
||||||
|
|
||||||
---
|
|
||||||
gevent/_ssl2.py | 28 ++++++++++++++++++++--------
|
|
||||||
1 file changed, 20 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/gevent/ssl.py b/gevent/ssl.py
|
|
||||||
index 21491b7..85e6a86 100644
|
|
||||||
--- a/gevent/ssl.py
|
|
||||||
+++ b/gevent/ssl.py
|
|
||||||
@@ -80,15 +80,27 @@ def __init__(self, sock, keyfile=None, certfile=None,
|
|
||||||
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)
|
|
||||||
+ if hasattr(_ssl, 'sslwrap'):
|
|
||||||
+ 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)
|
|
||||||
else:
|
|
||||||
- self._sslobj = _ssl.sslwrap(self._sock, server_side,
|
|
||||||
- keyfile, certfile,
|
|
||||||
- cert_reqs, ssl_version, ca_certs,
|
|
||||||
- ciphers)
|
|
||||||
+ self.context = __ssl__.SSLContext(ssl_version)
|
|
||||||
+ self.context.verify_mode = cert_reqs
|
|
||||||
+ if ca_certs:
|
|
||||||
+ self.context.load_verify_locations(ca_certs)
|
|
||||||
+ if certfile:
|
|
||||||
+ self.context.load_cert_chain(certfile, keyfile)
|
|
||||||
+ if ciphers:
|
|
||||||
+ self.context.set_ciphers(ciphers)
|
|
||||||
+ self._sslobj = self.context._wrap_socket(self._sock, server_side=server_side, ssl_sock=self)
|
|
||||||
+
|
|
||||||
if do_handshake_on_connect:
|
|
||||||
self.do_handshake()
|
|
||||||
self.keyfile = keyfile
|
|
|
@ -5589,16 +5589,14 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
gevent = buildPythonPackage rec {
|
gevent = buildPythonPackage rec {
|
||||||
name = "gevent-1.0.1";
|
name = "gevent-1.0.2";
|
||||||
disabled = isPy3k || isPyPy; # see https://github.com/surfly/gevent/issues/248
|
disabled = isPy3k || isPyPy; # see https://github.com/surfly/gevent/issues/248
|
||||||
|
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url = "https://pypi.python.org/packages/source/g/gevent/${name}.tar.gz";
|
url = "https://pypi.python.org/packages/source/g/gevent/${name}.tar.gz";
|
||||||
sha256 = "0hyzfb0gcx9pm5c2igan8y57hqy2wixrwvdjwsaivxsqs0ay49s6";
|
sha256 = "0cds7yvwdlqmd590i59vzxaviwxk4js6dkhnmdxb3p1xac7wmq9s";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [ ../development/python-modules/gevent_sslwrap.patch ];
|
|
||||||
|
|
||||||
buildInputs = with self; [ pkgs.libev ];
|
buildInputs = with self; [ pkgs.libev ];
|
||||||
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];
|
propagatedBuildInputs = optionals (!isPyPy) [ self.greenlet ];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue