24 buildPythonPackage rec {
29 disabled = pythonOlder "3.7";
31 src = fetchFromGitHub {
32 owner = "python-attrs";
34 rev = "refs/tags/v${version}";
35 hash = "sha256-zWM5zmZr2EiJb/4Dc6KjDL89p0C1V0Dsz949byz5OVM=";
43 propagatedBuildInputs =
45 ++ lib.optionals (pythonOlder "3.11") [
66 substituteInPlace pyproject.toml \
67 --replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" ""
68 substituteInPlace tests/test_preconf.py \
69 --replace "from orjson import dumps as orjson_dumps" "" \
70 --replace "from orjson import loads as orjson_loads" ""
74 export HOME=$(mktemp -d);
78 # Don't run benchmarking tests
79 "bench/test_attrs_collections.py"
80 "bench/test_attrs_nested.py"
81 "bench/test_attrs_primitives.py"
82 "bench/test_primitives.py"
86 # orjson is not available as it requires Rust nightly features to compile its requirements
88 # tomlkit is pinned to an older version and newer versions raise InvalidControlChar exception
92 pythonImportsCheck = [ "cattr" ];
95 description = "Python custom class converters for attrs";
96 homepage = "https://github.com/python-attrs/cattrs";
97 changelog = "https://github.com/python-attrs/cattrs/blob/${src.rev}/HISTORY.md";
98 license = with licenses; [ mit ];
99 maintainers = with maintainers; [ fab ];