22 buildPythonPackage rec {
27 disabled = pythonOlder "3.7";
29 src = fetchFromGitHub {
30 owner = "python-attrs";
33 hash = "sha256-YO4Clbo5fmXbysxwwM2qCHJwO5KwDC05VctRVFruJcw=";
40 propagatedBuildInputs = [
42 ] ++ lib.optionals (pythonOlder "3.11") [
64 substituteInPlace pyproject.toml \
65 --replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" "" \
66 --replace 'orjson = "^3.5.2"' "" \
67 --replace "[tool.poetry.group.dev.dependencies]" "[tool.poetry.dev-dependencies]"
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 = [
97 description = "Python custom class converters for attrs";
98 homepage = "https://github.com/python-attrs/cattrs";
99 changelog = "https://github.com/python-attrs/cattrs/blob/${src.rev}/HISTORY.md";
100 license = with licenses; [ mit ];
101 maintainers = with maintainers; [ fab ];