at 22.05-pre 2.2 kB view raw
1{ lib 2, buildPythonPackage 3, isPyPy 4, fetchPypi 5, pythonOlder 6, curl 7, openssl 8, bottle 9, pytestCheckHook 10, nose 11, flaky 12}: 13 14buildPythonPackage rec { 15 pname = "pycurl"; 16 version = "7.44.1"; 17 disabled = isPyPy || (pythonOlder "3.5"); # https://github.com/pycurl/pycurl/issues/208 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "5bcef4d988b74b99653602101e17d8401338d596b9234d263c728a0c3df003e8"; 22 }; 23 24 preConfigure = '' 25 substituteInPlace setup.py --replace '--static-libs' '--libs' 26 export PYCURL_SSL_LIBRARY=openssl 27 ''; 28 29 buildInputs = [ 30 curl 31 openssl.out 32 ]; 33 34 nativeBuildInputs = [ 35 curl 36 ]; 37 38 checkInputs = [ 39 bottle 40 pytestCheckHook 41 nose 42 flaky 43 ]; 44 45 pytestFlagsArray = [ 46 # don't pick up the tests directory below examples/ 47 "tests" 48 ]; 49 50 preCheck = '' 51 export HOME=$TMPDIR 52 ''; 53 54 disabledTests = [ 55 # libcurl stopped passing the reason phrase from the HTTP status line 56 # https://github.com/pycurl/pycurl/issues/679 57 "test_failonerror" 58 "test_failonerror_status_line_invalid_utf8_python3" 59 # bottle>=0.12.17 escapes utf8 properly, so these test don't work anymore 60 # https://github.com/pycurl/pycurl/issues/669 61 "test_getinfo_content_type_invalid_utf8_python3" 62 "test_getinfo_cookie_invalid_utf8_python3" 63 "test_getinfo_raw_content_type_invalid_utf8" 64 "test_getinfo_raw_cookie_invalid_utf8" 65 # tests that require network access 66 "test_keyfunction" 67 "test_keyfunction_bogus_return" 68 # OSError: tests/fake-curl/libcurl/with_openssl.so: cannot open shared object file: No such file or directory 69 "test_libcurl_ssl_openssl" 70 # OSError: tests/fake-curl/libcurl/with_nss.so: cannot open shared object file: No such file or directory 71 "test_libcurl_ssl_nss" 72 # OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot open shared object file: No such file or directory 73 "test_libcurl_ssl_gnutls" 74 # AssertionError: assert 'crypto' in ['curl'] 75 "test_ssl_in_static_libs" 76 ]; 77 78 meta = with lib; { 79 homepage = "http://pycurl.sourceforge.net/"; 80 description = "Python wrapper for libcurl"; 81 license = licenses.lgpl2Only; 82 maintainers = with maintainers; []; 83 }; 84}