2018-03-15 17:14:12 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, isPyPy
|
|
|
|
, fetchPypi
|
|
|
|
, curl
|
|
|
|
, openssl
|
|
|
|
, bottle
|
|
|
|
, pytest
|
|
|
|
, nose
|
|
|
|
, flaky
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pycurl";
|
2020-05-09 11:01:55 +01: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 11:01:55 +01:00
|
|
|
sha256 = "ec7dd291545842295b7b56c12c90ffad2976cc7070c98d7b1517b7b6cd5994b3";
|
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
|
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 \
|
|
|
|
--ignore=tests/memory_mgmt_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";
|
|
|
|
};
|
|
|
|
}
|