at 23.05-pre 1.8 kB view raw
1{ lib 2, buildPythonPackage 3, fastjsonschema 4, fetchFromGitHub 5, fetchpatch 6, future-typing 7, inflection 8, mypy 9, orjson 10, pandas 11, pendulum 12, poetry-core 13, pydantic 14, pytestCheckHook 15, pythonOlder 16, sqlalchemy 17, ujson 18}: 19 20buildPythonPackage rec { 21 pname = "typical"; 22 version = "2.8.0"; 23 format = "pyproject"; 24 25 # Support for typing-extensions >= 4.0.0 on Python < 3.10 is missing 26 disabled = pythonOlder "3.10"; 27 28 src = fetchFromGitHub { 29 owner = "seandstewart"; 30 repo = "typical"; 31 rev = "v${version}"; 32 hash = "sha256-DRjQmoZzWw5vpwIx70wQg6EO/aHqyX7RWpWZ9uOxSTg="; 33 }; 34 35 nativeBuildInputs = [ 36 poetry-core 37 ]; 38 39 propagatedBuildInputs = [ 40 fastjsonschema 41 future-typing 42 inflection 43 orjson 44 pendulum 45 ujson 46 ]; 47 48 checkInputs = [ 49 pytestCheckHook 50 mypy 51 pydantic 52 sqlalchemy 53 pandas 54 ]; 55 56 patches = [ 57 # Switch to poetry-core, https://github.com/seandstewart/typical/pull/193 58 (fetchpatch { 59 name = "switch-to-poetry-core.patch"; 60 url = "https://github.com/seandstewart/typical/commit/66b3c34f8969b7fb1f684f0603e514405bab0dd7.patch"; 61 sha256 = "sha256-c7qJOtHmJRnVEGl+OADB3HpjvMK8aYDD9+0gplOn9pQ="; 62 }) 63 ]; 64 65 disabledTests = [ 66 # ConstraintValueError: Given value <{'key... 67 "test_tagged_union_validate" 68 # TypeError: 'NoneType' object cannot be interpreted as an integer 69 "test_ujson" 70 ]; 71 72 disabledTestPaths = [ 73 # We don't care about benchmarks 74 "benchmark/" 75 # Tests are failing on Hydra 76 "tests/mypy/test_mypy.py" 77 ]; 78 79 pythonImportsCheck = [ 80 "typic" 81 ]; 82 83 meta = with lib; { 84 description = "Python library for runtime analysis, inference and validation of Python types"; 85 homepage = "https://python-typical.org/"; 86 license = licenses.mit; 87 maintainers = with maintainers; [ kfollesdal ]; 88 }; 89}