diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/uvloop/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/uvloop/default.nix | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/uvloop/default.nix b/nixpkgs/pkgs/development/python-modules/uvloop/default.nix index a37e6a3675ba..27f7b68fe89c 100644 --- a/nixpkgs/pkgs/development/python-modules/uvloop/default.nix +++ b/nixpkgs/pkgs/development/python-modules/uvloop/default.nix @@ -1,69 +1,69 @@ { lib , stdenv , buildPythonPackage +, pythonOlder , fetchPypi -, pyopenssl , libuv -, psutil -, isPy27 -, pythonAtLeast , CoreServices , ApplicationServices # Check Inputs +, aiohttp +, psutil +, pyopenssl , pytestCheckHook -# , pytest-asyncio }: buildPythonPackage rec { pname = "uvloop"; - version = "0.14.0"; - disabled = isPy27; + version = "0.15.0"; + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"; + sha256 = "0rfhr84km8k5gj0036b2pznwmc8macx56vkxc3aksvns95dksl0s"; }; - patches = lib.optional stdenv.isDarwin ./darwin_sandbox.patch; - buildInputs = [ libuv - ] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ]; - - pythonImportsCheck = [ - "uvloop" - "uvloop.loop" + ] ++ lib.optionals stdenv.isDarwin [ + CoreServices + ApplicationServices ]; dontUseSetuptoolsCheck = true; - checkInputs = [ pytestCheckHook pyopenssl psutil ]; + checkInputs = [ + aiohttp + pytestCheckHook + pyopenssl + psutil + ]; pytestFlagsArray = [ # from pytest.ini, these are NECESSARY to prevent failures "--capture=no" "--assert=plain" + "--strict" "--tb=native" # ignore code linting tests "--ignore=tests/test_sourcecode.py" ]; - disabledTests = [ - "test_sock_cancel_add_reader_race" # asyncio version of test is supposed to be skipped but skip doesn't happen. uvloop version runs fine - ] ++ lib.optionals (pythonAtLeast "3.8") [ "test_write_to_closed_transport" ]; # https://github.com/MagicStack/uvloop/issues/355 - # 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 - '' + lib.optionalString stdenv.isDarwin '' - # Some tests fail on Darwin - rm tests/test_[stu]*.py ''; + postCheck = '' popd ''; + pythonImportsCheck = [ + "uvloop" + "uvloop.loop" + ]; + # Some of the tests use localhost networking. __darwinAllowLocalNetworking = true; @@ -72,6 +72,5 @@ buildPythonPackage rec { homepage = "https://github.com/MagicStack/uvloop"; license = licenses.mit; maintainers = with maintainers; [ costrouc ]; - broken = pythonAtLeast "3.9"; # see: https://github.com/MagicStack/uvloop/issues/365 }; } |