Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pycurl / default.nix
blob3e966057bb243fa5ecdf912b0832e8f785c225dd
1 { lib
2 , stdenv
3 , buildPythonPackage
4 , isPyPy
5 , fetchPypi
6 , pythonOlder
7 , curl
8 , openssl
9 , bottle
10 , pytestCheckHook
11 , flaky
14 buildPythonPackage rec {
15   pname = "pycurl";
16   version = "7.45.3";
17   format = "setuptools";
18   disabled = isPyPy || (pythonOlder "3.5"); # https://github.com/pycurl/pycurl/issues/208
20   src = fetchPypi {
21     inherit pname version;
22     hash = "sha256-jCRxr5B5rXmOFkXsCw09QiPbaHN50X3TanBjdEn4HWs=";
23   };
25   preConfigure = ''
26     substituteInPlace setup.py --replace '--static-libs' '--libs'
27     export PYCURL_SSL_LIBRARY=openssl
28   '';
30   buildInputs = [
31     curl
32     openssl
33   ];
35   nativeBuildInputs = [
36     curl
37   ];
39   __darwinAllowLocalNetworking = true;
41   nativeCheckInputs = [
42     bottle
43     pytestCheckHook
44     flaky
45   ];
47   pytestFlagsArray = [
48     # don't pick up the tests directory below examples/
49     "tests"
50   ];
52   preCheck = ''
53     export HOME=$TMPDIR
54   '';
56   disabledTests = [
57     # tests that require network access
58     "test_keyfunction"
59     "test_keyfunction_bogus_return"
60     # OSError: tests/fake-curl/libcurl/with_openssl.so: cannot open shared object file: No such file or directory
61     "test_libcurl_ssl_openssl"
62     # OSError: tests/fake-curl/libcurl/with_nss.so: cannot open shared object file: No such file or directory
63     "test_libcurl_ssl_nss"
64     # OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot open shared object file: No such file or directory
65     "test_libcurl_ssl_gnutls"
66     # AssertionError: assert 'crypto' in ['curl']
67     "test_ssl_in_static_libs"
68     # tests that require curl with http3Support
69     "test_http_version_3"
70     # https://github.com/pycurl/pycurl/issues/819
71     "test_multi_socket_select"
72     # https://github.com/pycurl/pycurl/issues/729
73     "test_easy_pause_unpause"
74     "test_multi_socket_action"
75     # https://github.com/pycurl/pycurl/issues/822
76     "test_request_with_verifypeer"
77     # https://github.com/pycurl/pycurl/issues/836
78     "test_proxy_tlsauth"
79   ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
80     # Fatal Python error: Segmentation fault
81     "cadata_test"
82   ];
84   meta = with lib; {
85     homepage = "http://pycurl.io/";
86     description = "Python Interface To The cURL library";
87     license = with licenses; [ lgpl2Only mit ];
88     maintainers = with maintainers; [ ];
89   };