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 nativeBuildInputs = [ curl ];
24
25 checkInputs = [ bottle pytest nose flaky ];
26
27 checkPhase = ''
28 py.test -k "not ssh_key_cb_test \
29 and not test_libcurl_ssl_gnutls \
30 and not test_libcurl_ssl_nss \
31 and not test_libcurl_ssl_openssl \
32 and not test_libcurl_ssl_unrecognized \
33 and not test_request_with_verifypeer \
34 and not test_ssl_in_static_libs" tests
35 '';
36
37 preConfigure = ''
38 substituteInPlace setup.py --replace '--static-libs' '--libs'
39 export PYCURL_SSL_LIBRARY=openssl
40 '';
41
42 meta = {
43 homepage = http://pycurl.sourceforge.net/;
44 description = "Python wrapper for libcurl";
45 };
46}