1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 aiohttp, 6 pytestCheckHook, 7 pytest-aiohttp, 8 setuptools, 9}: 10 11buildPythonPackage rec { 12 pname = "aiohttp-cors"; 13 version = "0.8.1"; 14 pyproject = true; 15 16 src = fetchFromGitHub { 17 owner = "aio-libs"; 18 repo = "aiohttp-cors"; 19 tag = "v${version}"; 20 hash = "sha256-AbMuUeCNM8+oZj/hutG3zxHOwYN8uZlLFBeYTlu1fh4="; 21 }; 22 23 build-system = [ setuptools ]; 24 25 dependencies = [ aiohttp ]; 26 27 pythonImportsCheck = [ "aiohttp_cors" ]; 28 29 nativeCheckInputs = [ 30 pytestCheckHook 31 pytest-aiohttp 32 ]; 33 34 disabledTests = [ 35 # async def functions are not natively supported and have been skipped. 36 "test_main" 37 "test_defaults" 38 "test_raises_forbidden_when_config_not_found" 39 "test_raises_when_handler_not_extend" 40 ]; 41 42 # interactive browser tests using selenium 43 disabledTestPaths = [ "tests/integration" ]; 44 45 meta = with lib; { 46 changelog = "https://github.com/aio-libs/aiohttp-cors/blob/${src.tag}/CHANGES.rst"; 47 description = "CORS support for aiohttp"; 48 homepage = "https://github.com/aio-libs/aiohttp-cors"; 49 license = licenses.asl20; 50 maintainers = with maintainers; [ ]; 51 }; 52}