2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy3k
|
2020-10-07 09:15:18 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, sphinx
|
2020-10-07 09:15:18 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "curio";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.6";
|
|
|
|
format = "setuptools";
|
2021-07-04 02:40:35 +00:00
|
|
|
disabled = !isPy3k;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-VipYbbICFrp9K+gmPeuesHnlYEj5uJBtEdX0WqgcUkc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-04 02:40:35 +00:00
|
|
|
pytestCheckHook
|
|
|
|
sphinx
|
2021-03-19 17:17:44 +00:00
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2020-10-07 09:15:18 +00:00
|
|
|
disabledTests = [
|
2023-08-22 20:05:09 +00:00
|
|
|
"test_aside_basic" # times out
|
|
|
|
"test_write_timeout" # flaky, does not always time out
|
|
|
|
"test_aside_cancel" # fails because modifies PYTHONPATH and cant find pytest
|
|
|
|
"test_ssl_outgoing" # touches network
|
|
|
|
"test_unix_echo" # socket bind error on hydra when built with other packages
|
|
|
|
"test_unix_ssl_server" # socket bind error on hydra when built with other packages
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
# connects to python.org:1, expects an OsError, hangs in the darwin sandbox
|
|
|
|
"test_create_bad_connection"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-04 02:40:35 +00:00
|
|
|
pythonImportsCheck = [ "curio" ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2021-07-04 02:40:35 +00:00
|
|
|
description = "Library for performing concurrent I/O with coroutines in Python";
|
2022-12-17 10:02:37 +00:00
|
|
|
homepage = "https://github.com/dabeaz/curio";
|
|
|
|
changelog = "https://github.com/dabeaz/curio/raw/${version}/CHANGES";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = [ maintainers.marsam ];
|
|
|
|
};
|
|
|
|
}
|