diff options
author | Alyssa Ross <hi@alyssa.is> | 2021-07-09 12:30:28 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2021-07-23 09:11:31 +0000 |
commit | 55cc63c079f49e81d695a25bc2f5b3902f2bd290 (patch) | |
tree | e705335d97f50b927c76ccb4a3fbde9fab8372b9 /nixpkgs/pkgs/development/python-modules/cattrs/default.nix | |
parent | c26eb6f74d9393127a21eee7a9620a920769f613 (diff) | |
parent | 87807e64a5ef5206b745a40af118c7be8db73681 (diff) | |
download | nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.gz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.bz2 nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.lz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.xz nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.tar.zst nixlib-55cc63c079f49e81d695a25bc2f5b3902f2bd290.zip |
Merge commit '87807e64a5ef5206b745a40af118c7be8db73681'
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/cattrs/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/cattrs/default.nix | 49 |
1 files changed, 46 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/cattrs/default.nix b/nixpkgs/pkgs/development/python-modules/cattrs/default.nix index a48e29b827b7..7f51c89e3e4e 100644 --- a/nixpkgs/pkgs/development/python-modules/cattrs/default.nix +++ b/nixpkgs/pkgs/development/python-modules/cattrs/default.nix @@ -1,27 +1,70 @@ { lib , attrs +, bson , buildPythonPackage , fetchFromGitHub , hypothesis +, immutables +, msgpack +, poetry-core , pytestCheckHook +, pyyaml +, tomlkit +, ujson }: buildPythonPackage rec { pname = "cattrs"; - version = "1.1.2"; + version = "1.7.0"; + format = "pyproject"; src = fetchFromGitHub { owner = "Tinche"; repo = pname; rev = "v${version}"; - sha256 = "083d5mi6x7qcl26wlvwwn7gsp5chxlxkh4rp3a41w8cfwwr3h6l8"; + sha256 = "sha256-7F4S4IeApbULXhkEZ0oab3Y7sk20Ag2fCYxsyi4WbWw="; }; - propagatedBuildInputs = [ attrs ]; + nativeBuildInputs = [ + poetry-core + ]; + + propagatedBuildInputs = [ + attrs + ]; checkInputs = [ + bson hypothesis + immutables + msgpack pytestCheckHook + pyyaml + tomlkit + ujson + ]; + + postPatch = '' + substituteInPlace setup.cfg \ + --replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" "" + substituteInPlace pyproject.toml \ + --replace 'orjson = "^3.5.2"' "" + substituteInPlace tests/test_preconf.py \ + --replace "from orjson import dumps as orjson_dumps" "" \ + --replace "from orjson import loads as orjson_loads" "" + ''; + + disabledTestPaths = [ + # Don't run benchmarking tests + "bench/test_attrs_collections.py" + "bench/test_attrs_nested.py" + "bench/test_attrs_primitives.py" + "bench/test_primitives.py" + ]; + + disabledTests = [ + # orjson is not available as it requires Rust nightly features to compile its requirements + "test_orjson" ]; pythonImportsCheck = [ "cattr" ]; |