at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 falcon, 5 fetchFromGitHub, 6 furl, 7 hatchling, 8 jsonschema, 9 pytest-asyncio, 10 pytest-httpbin, 11 pytest-pook, 12 pytestCheckHook, 13 xmltodict, 14}: 15 16buildPythonPackage rec { 17 pname = "pook"; 18 version = "2.1.4"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "h2non"; 23 repo = "pook"; 24 tag = "v${version}"; 25 hash = "sha256-z0QaMdsX2xLXICgQwnlUD2KsgCn0jB4wO83+6O4B3D8="; 26 }; 27 28 build-system = [ hatchling ]; 29 30 dependencies = [ 31 furl 32 jsonschema 33 xmltodict 34 ]; 35 36 nativeCheckInputs = [ 37 falcon 38 pytest-asyncio 39 pytest-httpbin 40 pytest-pook 41 pytestCheckHook 42 ]; 43 44 pythonImportsCheck = [ "pook" ]; 45 46 disabledTests = [ 47 # furl compat issue 48 "test_headers_not_matching" 49 ]; 50 51 disabledTestPaths = [ 52 # Don't test integrations 53 "tests/integration/" 54 # Tests require network access 55 "tests/unit/interceptors/" 56 ]; 57 58 # Tests use sockets 59 __darwinAllowLocalNetworking = true; 60 61 meta = with lib; { 62 description = "HTTP traffic mocking and testing"; 63 homepage = "https://github.com/h2non/pook"; 64 changelog = "https://github.com/h2non/pook/blob/v${src.tag}/History.rst"; 65 license = licenses.mit; 66 maintainers = with maintainers; [ fab ]; 67 }; 68}