7f428e89d7
This test case gets stuck on our aarch64 builder since the 0.15.0 upgrade, and so the package has not been in the cache for aarch64, since the job reliably timed out. The issue didn't get noticed earlier because the package does in fact build on some aarch64 machines, like my raspberry pi 4. Reported upstream at https://github.com/MagicStack/uvloop/issues/412.
84 lines
1.7 KiB
Nix
84 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, buildPythonPackage
|
|
, pythonOlder
|
|
, fetchPypi
|
|
, libuv
|
|
, CoreServices
|
|
, ApplicationServices
|
|
# Check Inputs
|
|
, aiohttp
|
|
, psutil
|
|
, pyopenssl
|
|
, pytestCheckHook
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "uvloop";
|
|
version = "0.15.2";
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "2bb0624a8a70834e54dde8feed62ed63b50bad7a1265c40d6403a2ac447bce01";
|
|
};
|
|
|
|
buildInputs = [
|
|
libuv
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
CoreServices
|
|
ApplicationServices
|
|
];
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
checkInputs = [
|
|
aiohttp
|
|
pytestCheckHook
|
|
pyopenssl
|
|
psutil
|
|
];
|
|
|
|
pytestFlagsArray = [
|
|
# from pytest.ini, these are NECESSARY to prevent failures
|
|
"--capture=no"
|
|
"--assert=plain"
|
|
"--strict"
|
|
"--tb=native"
|
|
] ++ lib.optionals (stdenv.isAarch64) [
|
|
# test gets stuck in epoll_pwait on hydras aarch64 builders
|
|
# https://github.com/MagicStack/uvloop/issues/412
|
|
"--deselect" "tests/test_tcp.py::Test_AIO_TCPSSL::test_remote_shutdown_receives_trailing_data"
|
|
];
|
|
|
|
disabledTestPaths = [
|
|
# ignore code linting tests
|
|
"tests/test_sourcecode.py"
|
|
];
|
|
|
|
# force using installed/compiled uvloop vs source by moving tests to temp dir
|
|
preCheck = ''
|
|
export TEST_DIR=$(mktemp -d)
|
|
cp -r tests $TEST_DIR
|
|
pushd $TEST_DIR
|
|
'';
|
|
|
|
postCheck = ''
|
|
popd
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"uvloop"
|
|
"uvloop.loop"
|
|
];
|
|
|
|
# Some of the tests use localhost networking.
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
meta = with lib; {
|
|
description = "Fast implementation of asyncio event loop on top of libuv";
|
|
homepage = "https://github.com/MagicStack/uvloop";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ costrouc ];
|
|
};
|
|
}
|