nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 95 lines 1.5 kB view raw
1{ lib 2, buildPythonPackage 3, pythonOlder 4, isPyPy 5, fetchFromGitHub 6 7# build 8, cython 9 10# tests 11, aiofiles 12, cbor2 13, httpx 14, msgpack 15, mujson 16, orjson 17, pytest-asyncio 18, pytestCheckHook 19, pyyaml 20, rapidjson 21, requests 22, testtools 23, ujson 24, uvicorn 25, websockets 26}: 27 28buildPythonPackage rec { 29 pname = "falcon"; 30 version = "3.1.0"; 31 format = "pyproject"; 32 disabled = pythonOlder "3.5"; 33 34 src = fetchFromGitHub { 35 owner = "falconry"; 36 repo = pname; 37 rev = version; 38 hash = "sha256-Y6bD0GCXhqpvMV+/i1v59p2qWZ91f2ey7sPQrVALY54="; 39 }; 40 41 nativeBuildInputs = lib.optionals (!isPyPy) [ 42 cython 43 ]; 44 45 preCheck = '' 46 export HOME=$TMPDIR 47 cp -R tests examples $TMPDIR 48 pushd $TMPDIR 49 ''; 50 51 postCheck = '' 52 popd 53 ''; 54 55 checkInputs = [ 56 # https://github.com/falconry/falcon/blob/master/requirements/tests 57 pytestCheckHook 58 pyyaml 59 requests 60 rapidjson 61 orjson 62 63 # ASGI specific 64 pytest-asyncio 65 aiofiles 66 httpx 67 uvicorn 68 websockets 69 70 # handler specific 71 cbor2 72 msgpack 73 mujson 74 ujson 75 ] ++ lib.optionals (pythonOlder "3.10") [ 76 testtools 77 ]; 78 79 pytestFlagsArray = [ 80 "tests" 81 ]; 82 83 disabledTestPaths = [ 84 # needs a running server 85 "tests/asgi/test_asgi_servers.py" 86 ]; 87 88 meta = with lib; { 89 description = "An unladen web framework for building APIs and app backends"; 90 homepage = "https://falconframework.org/"; 91 license = licenses.asl20; 92 maintainers = with maintainers; [ desiderius ]; 93 }; 94 95}