summary refs log tree commit diff
path: root/pkgs/development/python-modules/pycurl/default.nix
blob: 153a6e0377db468bc3cabc6f912fde8b37f13952 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ buildPythonPackage
, isPyPy
, fetchPypi
, curl
, openssl
, bottle
, pytest
, nose
, flaky
}:

buildPythonPackage rec {
  pname = "pycurl";
  version = "7.43.0.3";
  disabled = isPyPy; # https://github.com/pycurl/pycurl/issues/208

  src = fetchPypi {
    inherit pname version;
    sha256 = "13nsvqhvnmnvfk75s8iynqsgszyv06cjp4drd3psi7zpbh63623g";
  };

  buildInputs = [
    curl
    openssl.out
  ];

  nativeBuildInputs = [
    curl
  ];

  checkInputs = [
    bottle
    pytest
    nose
    flaky
  ];

  checkPhase = ''
    HOME=$TMPDIR pytest tests -k "not test_ssl_in_static_libs \
                     and not test_keyfunction \
                     and not test_keyfunction_bogus_return \
                     and not test_libcurl_ssl_gnutls \
                     and not test_libcurl_ssl_nss \
                     and not test_libcurl_ssl_openssl" \
                 --ignore=tests/getinfo_test.py
  '';

  preConfigure = ''
    substituteInPlace setup.py --replace '--static-libs' '--libs'
    export PYCURL_SSL_LIBRARY=openssl
  '';

  meta = {
    homepage = http://pycurl.sourceforge.net/;
    description = "Python wrapper for libcurl";
  };
}