python3Packages.uvloop: fix tests on Darwin

This commit is contained in:
Austin Butler 2022-02-24 10:15:45 -08:00
parent 041dcd46a5
commit daef4faf18

View file

@ -62,8 +62,12 @@ buildPythonPackage rec {
"tests/test_sourcecode.py"
];
preCheck = lib.optionalString stdenv.isDarwin ''
# Work around "OSError: AF_UNIX path too long"
# https://github.com/MagicStack/uvloop/issues/463
export TMPDIR="/tmp"
'' + ''
# 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