depot/third_party/nixpkgs/pkgs/development/python-modules/aiofiles/default.nix
Default email 92b3d6365d Project import generated by Copybara.
GitOrigin-RevId: 412b9917cea092f3d39f9cd5dead4effd5bc4053
2022-10-30 16:09:59 +01:00

54 lines
1,014 B
Nix

{ stdenv
, lib
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pytest-asyncio
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "aiofiles";
version = "22.1.0";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "Tinche";
repo = pname;
rev = "v${version}";
sha256 = "sha256-2itjGYusJT6sbCAgvKsI9IXeAOP7VQV0bpifFBZmnAo=";
};
nativeBuildInputs = [
poetry-core
];
checkInputs = [
pytest-asyncio
pytestCheckHook
];
disabledTests = lib.optionals stdenv.isDarwin [
"test_sendfile_file"
# require loopback networking:
"test_sendfile_socket"
"test_serve_small_bin_file_sync"
"test_serve_small_bin_file"
"test_slow_file"
];
pythonImportsCheck = [
"aiofiles"
];
meta = {
description = "File support for asyncio";
homepage = "https://github.com/Tinche/aiofiles";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ fridh ];
};
}