2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
|
|
|
pytest-asyncio,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonOlder,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aiofiles";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "23.2.1";
|
2021-08-27 14:25:00 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2021-08-27 14:25:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Tinche";
|
|
|
|
repo = pname;
|
2023-03-30 22:05:00 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-EbRQD/AoTMWAlPOMWmD0UdFjRyjt5MUBkJtcydUCdHM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2021-08-27 14:25:00 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-27 14:25:00 +00:00
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
|
|
|
"test_sendfile_file"
|
2021-12-26 17:43:05 +00:00
|
|
|
|
|
|
|
# require loopback networking:
|
|
|
|
"test_sendfile_socket"
|
|
|
|
"test_serve_small_bin_file_sync"
|
|
|
|
"test_serve_small_bin_file"
|
|
|
|
"test_slow_file"
|
2021-08-27 14:25:00 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "aiofiles" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-30 22:05:00 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "File support for asyncio";
|
|
|
|
homepage = "https://github.com/Tinche/aiofiles";
|
2023-03-30 22:05:00 +00:00
|
|
|
license = with licenses; [ asl20 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|