diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-06-22 15:01:47 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-06-22 16:57:59 +0000 |
commit | 633cab0ecb07627706c6b523e219490f019eaab5 (patch) | |
tree | 4fb472bdfe2723037dad53dc1b8a87c939015f5e /nixpkgs/pkgs/development/python-modules/pycurl/default.nix | |
parent | ffb691c199e7e0cbc4e45e5310779c9e3f7c2a73 (diff) | |
parent | 432fc2d9a67f92e05438dff5fdc2b39d33f77997 (diff) | |
download | nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.gz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.bz2 nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.lz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.xz nixlib-633cab0ecb07627706c6b523e219490f019eaab5.tar.zst nixlib-633cab0ecb07627706c6b523e219490f019eaab5.zip |
Merge commit '432fc2d9a67f92e05438dff5fdc2b39d33f77997'
# Conflicts: # nixpkgs/pkgs/applications/editors/emacs/elisp-packages/elpa-generated.nix # nixpkgs/pkgs/applications/networking/mailreaders/thunderbird/default.nix # nixpkgs/pkgs/applications/window-managers/sway/default.nix # nixpkgs/pkgs/build-support/rust/default.nix # nixpkgs/pkgs/development/go-modules/generic/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pycurl/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pycurl/default.nix | 64 |
1 files changed, 42 insertions, 22 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pycurl/default.nix b/nixpkgs/pkgs/development/python-modules/pycurl/default.nix index fe62d1be1ea1..e202d1928f21 100644 --- a/nixpkgs/pkgs/development/python-modules/pycurl/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pycurl/default.nix @@ -1,11 +1,12 @@ -{ buildPythonPackage +{ lib +, buildPythonPackage , isPyPy , fetchPypi , pythonOlder , curl , openssl , bottle -, pytest +, pytestCheckHook , nose , flaky }: @@ -20,6 +21,11 @@ buildPythonPackage rec { sha256 = "8301518689daefa53726b59ded6b48f33751c383cf987b0ccfbbc4ed40281325"; }; + preConfigure = '' + substituteInPlace setup.py --replace '--static-libs' '--libs' + export PYCURL_SSL_LIBRARY=openssl + ''; + buildInputs = [ curl openssl.out @@ -31,34 +37,48 @@ buildPythonPackage rec { checkInputs = [ bottle - pytest + pytestCheckHook nose flaky ]; - # skip impure or flakey tests - # See also: - # * https://github.com/NixOS/nixpkgs/issues/77304 - 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 \ - --ignore=tests/memory_mgmt_test.py \ - --ignore=tests/multi_memory_mgmt_test.py \ - --ignore=tests/multi_timer_test.py - ''; + pytestFlagsArray = [ + # don't pick up the tests directory below examples/ + "tests" + ]; - preConfigure = '' - substituteInPlace setup.py --replace '--static-libs' '--libs' - export PYCURL_SSL_LIBRARY=openssl + preCheck = '' + export HOME=$TMPDIR ''; - meta = { + disabledTests = [ + # libcurl stopped passing the reason phrase from the HTTP status line + # https://github.com/pycurl/pycurl/issues/679 + "test_failonerror" + "test_failonerror_status_line_invalid_utf8_python3" + # bottle>=0.12.17 escapes utf8 properly, so these test don't work anymore + # https://github.com/pycurl/pycurl/issues/669 + "test_getinfo_content_type_invalid_utf8_python3" + "test_getinfo_cookie_invalid_utf8_python3" + "test_getinfo_raw_content_type_invalid_utf8" + "test_getinfo_raw_cookie_invalid_utf8" + # tests that require network access + "test_keyfunction" + "test_keyfunction_bogus_return" + # OSError: tests/fake-curl/libcurl/with_openssl.so: cannot open shared object file: No such file or directory + "test_libcurl_ssl_openssl" + # OSError: tests/fake-curl/libcurl/with_nss.so: cannot open shared object file: No such file or directory + "test_libcurl_ssl_nss" + # OSError: tests/fake-curl/libcurl/with_gnutls.so: cannot open shared object file: No such file or directory + "test_libcurl_ssl_gnutls" + # AssertionError: assert 'crypto' in ['curl'] + "test_ssl_in_static_libs" + ]; + + meta = with lib; { homepage = "http://pycurl.sourceforge.net/"; description = "Python wrapper for libcurl"; + license = licenses.lgpl2Only; + maintainers = with maintainers; []; }; } |