1{ buildPythonPackage
2, isPyPy
3, fetchPypi
4, curl
5, openssl
6, bottle
7, pytest
8, nose
9, flaky
10}:
11
12buildPythonPackage rec {
13 pname = "pycurl";
14 version = "7.43.0.2";
15 disabled = isPyPy; # https://github.com/pycurl/pycurl/issues/208
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "0f0cdfc7a92d4f2a5c44226162434e34f7d6967d3af416a6f1448649c09a25a4";
20 };
21
22 buildInputs = [ curl openssl.out ];
23
24 checkInputs = [ bottle pytest nose flaky ];
25
26 checkPhase = ''
27 py.test -k "not ssh_key_cb_test \
28 and not test_libcurl_ssl_gnutls \
29 and not test_libcurl_ssl_nss \
30 and not test_libcurl_ssl_openssl \
31 and not test_libcurl_ssl_unrecognized \
32 and not test_request_with_verifypeer \
33 and not test_ssl_in_static_libs" tests
34 '';
35
36 preConfigure = ''
37 substituteInPlace setup.py --replace '--static-libs' '--libs'
38 export PYCURL_SSL_LIBRARY=openssl
39 '';
40
41 meta = {
42 homepage = http://pycurl.sourceforge.net/;
43 description = "Python wrapper for libcurl";
44 };
45}