2018-03-15 17:14:12 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, isPyPy
|
|
|
|
, fetchPypi
|
|
|
|
, curl
|
|
|
|
, openssl
|
|
|
|
, bottle
|
|
|
|
, pytest
|
|
|
|
, nose
|
|
|
|
, flaky
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycurl";
|
2020-05-09 10:01:55 +00:00
|
|
|
version = "7.43.0.5";
|
2018-03-15 17:14:12 +00:00
|
|
|
disabled = isPyPy; # https://github.com/pycurl/pycurl/issues/208
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-05-09 10:01:55 +00:00
|
|
|
sha256 = "ec7dd291545842295b7b56c12c90ffad2976cc7070c98d7b1517b7b6cd5994b3";
|
2018-03-15 17:14:12 +00:00
|
|
|
};
|
|
|
|
|
2019-07-16 19:44:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
openssl.out
|
|
|
|
];
|
2018-03-15 17:14:12 +00:00
|
|
|
|
2019-07-16 19:44:41 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
curl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
bottle
|
|
|
|
pytest
|
|
|
|
nose
|
|
|
|
flaky
|
|
|
|
];
|
2018-03-15 17:14:12 +00:00
|
|
|
|
2019-10-26 17:44:00 +00:00
|
|
|
# skip impure or flakey tests
|
2020-06-05 13:49:58 +00:00
|
|
|
# See also:
|
|
|
|
# * https://github.com/NixOS/nixpkgs/issues/77304
|
2018-03-15 17:14:12 +00:00
|
|
|
checkPhase = ''
|
2019-12-22 18:23:18 +00:00
|
|
|
HOME=$TMPDIR pytest tests -k "not test_ssl_in_static_libs \
|
2019-07-16 19:44:41 +00:00
|
|
|
and not test_keyfunction \
|
2019-08-22 21:20:00 +00:00
|
|
|
and not test_keyfunction_bogus_return \
|
|
|
|
and not test_libcurl_ssl_gnutls \
|
|
|
|
and not test_libcurl_ssl_nss \
|
2019-10-17 21:44:05 +00:00
|
|
|
and not test_libcurl_ssl_openssl" \
|
2019-10-26 17:44:00 +00:00
|
|
|
--ignore=tests/getinfo_test.py \
|
2020-06-05 13:49:58 +00:00
|
|
|
--ignore=tests/memory_mgmt_test.py \
|
2020-06-15 13:09:48 +00:00
|
|
|
--ignore=tests/multi_memory_mgmt_test.py \
|
|
|
|
--ignore=tests/multi_timer_test.py
|
2018-03-15 17:14:12 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
substituteInPlace setup.py --replace '--static-libs' '--libs'
|
|
|
|
export PYCURL_SSL_LIBRARY=openssl
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "http://pycurl.sourceforge.net/";
|
2018-03-15 17:14:12 +00:00
|
|
|
description = "Python wrapper for libcurl";
|
|
|
|
};
|
|
|
|
}
|