Merge pull request #261445 from mweinelt/python-uvloop-0.18.0
python311Packages.uvloop: 0.17.0 -> 0.18.0
This commit is contained in:
@@ -3,34 +3,42 @@
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, fetchPypi
|
||||
|
||||
# build-system
|
||||
, cython
|
||||
, setuptools
|
||||
|
||||
# native dependencies
|
||||
, libuv
|
||||
, CoreServices
|
||||
, ApplicationServices
|
||||
|
||||
# Check Inputs
|
||||
# tests
|
||||
, aiohttp
|
||||
, psutil
|
||||
, pyopenssl
|
||||
, pytest-forked
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "uvloop";
|
||||
version = "0.17.0";
|
||||
format = "setuptools";
|
||||
version = "0.18.0";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-Dd9rr5zxGhoixxSH858Vss9461vefltF+7meip2RueE=";
|
||||
hash = "sha256-1dETW+/+nNldA1DxnicWvDi+R9XfKW18xG47dVfA0f8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
setuptools
|
||||
];
|
||||
|
||||
env.LIBUV_CONFIGURE_HOST = stdenv.hostPlatform.config;
|
||||
|
||||
buildInputs = [
|
||||
libuv
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
@@ -38,45 +46,26 @@ buildPythonPackage rec {
|
||||
ApplicationServices
|
||||
];
|
||||
|
||||
dontUseSetuptoolsCheck = true;
|
||||
nativeCheckInputs = [
|
||||
pytest-forked
|
||||
aiohttp
|
||||
pyopenssl
|
||||
pytestCheckHook
|
||||
psutil
|
||||
] ++ lib.optionals (pythonOlder "3.11") [
|
||||
aiohttp
|
||||
];
|
||||
|
||||
LIBUV_CONFIGURE_HOST = stdenv.hostPlatform.config;
|
||||
|
||||
pytestFlagsArray = [
|
||||
# from pytest.ini, these are NECESSARY to prevent failures
|
||||
"--capture=no"
|
||||
"--assert=plain"
|
||||
"--strict"
|
||||
"--tb=native"
|
||||
# Depend on pyopenssl
|
||||
"--deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_flush_before_shutdown"
|
||||
"--deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_renegotiation"
|
||||
# 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"
|
||||
# Tries to import cythonized file for which the .pyx file is not shipped via PyPi
|
||||
"--deselect=tests/test_libuv_api.py::Test_UV_libuv::test_libuv_get_loop_t_ptr"
|
||||
# Tries to run "env", but fails to find it
|
||||
# Tries to run "env", but fails to find it, even with coreutils provided
|
||||
"--deselect=tests/test_process.py::Test_UV_Process::test_process_env_2"
|
||||
"--deselect=tests/test_process.py::Test_AIO_Process::test_process_env_2"
|
||||
# AssertionError: b'' != b'out\n'
|
||||
"--deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect"
|
||||
"--deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect"
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||
] ++ lib.optionals (stdenv.isDarwin) [
|
||||
# Segmentation fault
|
||||
"--deselect=tests/test_fs_event.py::Test_UV_FS_EVENT_RENAME::test_fs_event_rename"
|
||||
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
|
||||
# Broken: https://github.com/NixOS/nixpkgs/issues/160904
|
||||
"--deselect=tests/test_context.py::Test_UV_Context::test_create_ssl_server_manual_connection_lost"
|
||||
# Segmentation fault
|
||||
"--deselect=tests/test_fs_event.py::Test_UV_FS_EVENT_RENAME::test_fs_event_rename"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
@@ -84,23 +73,13 @@ buildPythonPackage rec {
|
||||
"tests/test_sourcecode.py"
|
||||
];
|
||||
|
||||
preCheck = lib.optionalString stdenv.isDarwin ''
|
||||
preCheck = ''
|
||||
# force using installed/compiled uvloop
|
||||
rm -rf uvloop
|
||||
'' + lib.optionalString stdenv.isDarwin ''
|
||||
# Work around "OSError: AF_UNIX path too long"
|
||||
# https://github.com/MagicStack/uvloop/issues/463
|
||||
export TMPDIR="/tmp"
|
||||
'' + ''
|
||||
# pyopenssl is not well supported by upstream
|
||||
# https://github.com/NixOS/nixpkgs/issues/175875
|
||||
substituteInPlace tests/test_tcp.py \
|
||||
--replace "from OpenSSL import SSL as openssl_ssl" ""
|
||||
# force using installed/compiled uvloop vs source by moving tests to temp dir
|
||||
export TEST_DIR=$(mktemp -d)
|
||||
cp -r tests $TEST_DIR
|
||||
pushd $TEST_DIR
|
||||
'';
|
||||
|
||||
postCheck = ''
|
||||
popd
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
@@ -112,6 +91,7 @@ buildPythonPackage rec {
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/MagicStack/uvloop/releases/tag/v${version}";
|
||||
description = "Fast implementation of asyncio event loop on top of libuv";
|
||||
homepage = "https://github.com/MagicStack/uvloop";
|
||||
license = licenses.mit;
|
||||
|
||||
Reference in New Issue
Block a user