2018-03-15 17:14:12 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, isPyPy
|
|
|
|
, fetchPypi
|
2020-11-05 23:38:33 +00:00
|
|
|
, pythonOlder
|
2018-03-15 17:14:12 +00:00
|
|
|
, curl
|
|
|
|
, openssl
|
|
|
|
, bottle
|
|
|
|
, pytest
|
|
|
|
, nose
|
|
|
|
, flaky
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycurl";
|
2020-10-25 09:06:55 +00:00
|
|
|
version = "7.43.0.6";
|
2020-11-05 23:38:33 +00:00
|
|
|
disabled = isPyPy || (pythonOlder "3.5"); # https://github.com/pycurl/pycurl/issues/208
|
2018-03-15 17:14:12 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-10-25 09:06:55 +00:00
|
|
|
sha256 = "8301518689daefa53726b59ded6b48f33751c383cf987b0ccfbbc4ed40281325";
|
2018-03-15 17:14:12 +00:00
|
|
|
};
|
|
|
|
|
2019-07-16 20:44:41 +01:00
|
|
|
buildInputs = [
|
|
|
|
curl
|
|
|
|
openssl.out
|
|
|
|
];
|
2018-03-15 17:14:12 +00:00
|
|
|
|
2019-07-16 20:44:41 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
curl
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
bottle
|
|
|
|
pytest
|
|
|
|
nose
|
|
|
|
flaky
|
|
|
|
];
|
2018-03-15 17:14:12 +00:00
|
|
|
|
2019-10-26 18:44:00 +01:00
|
|
|
# skip impure or flakey tests
|
2020-06-05 14:49:58 +01: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 20:44:41 +01:00
|
|
|
and not test_keyfunction \
|
2019-08-22 22:20:00 +01:00
|
|
|
and not test_keyfunction_bogus_return \
|
|
|
|
and not test_libcurl_ssl_gnutls \
|
|
|
|
and not test_libcurl_ssl_nss \
|
2019-10-17 22:44:05 +01:00
|
|
|
and not test_libcurl_ssl_openssl" \
|
2019-10-26 18:44:00 +01:00
|
|
|
--ignore=tests/getinfo_test.py \
|
2020-06-05 14:49:58 +01:00
|
|
|
--ignore=tests/memory_mgmt_test.py \
|
2020-06-15 14:09:48 +01: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 02:11:51 +01:00
|
|
|
homepage = "http://pycurl.sourceforge.net/";
|
2018-03-15 17:14:12 +00:00
|
|
|
description = "Python wrapper for libcurl";
|
|
|
|
};
|
|
|
|
}
|