git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.cattrs: 1.1.2 -> 1.7.0
commitcb1c6efd0886c10c2abd36b20e1cb35369ccf5b9 authorFabian Affolter <mail@fabian-affolter.ch> dateSun 4 Jul 2021, 00:02 (5 years ago) parentf69aae0
1 file changed+46−3
pkgs/development/python-modules/cattrs/default.nix+46−3
pkgs/development/python-modules/cattrs/default.nix+46−3
@@ -1,27 +1,70 @@
11{ lib
22, attrs
3+, bson
34, buildPythonPackage
45, fetchFromGitHub
56, hypothesis
7+, immutables
8+, msgpack
9+, poetry-core
610, pytestCheckHook
11+, pyyaml
12+, tomlkit
13+, ujson
714}:
815
916buildPythonPackage rec {
1017 pname = "cattrs";
11− version = "1.1.2";
18+ version = "1.7.0";
19+ format = "pyproject";
1220
1321 src = fetchFromGitHub {
1422 owner = "Tinche";
1523 repo = pname;
1624 rev = "v${version}";
17− sha256 = "083d5mi6x7qcl26wlvwwn7gsp5chxlxkh4rp3a41w8cfwwr3h6l8";
25+ sha256 = "sha256-7F4S4IeApbULXhkEZ0oab3Y7sk20Ag2fCYxsyi4WbWw=";
1826 };
1927
20− propagatedBuildInputs = [ attrs ];
28+ nativeBuildInputs = [
29+ poetry-core
30+ ];
31+
32+ propagatedBuildInputs = [
33+ attrs
34+ ];
2135
2236 checkInputs = [
37+ bson
2338 hypothesis
39+ immutables
40+ msgpack
2441 pytestCheckHook
42+ pyyaml
43+ tomlkit
44+ ujson
45+ ];
46+
47+ postPatch = ''
48+ substituteInPlace setup.cfg \
49+ --replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" ""
50+ substituteInPlace pyproject.toml \
51+ --replace 'orjson = "^3.5.2"' ""
52+ substituteInPlace tests/test_preconf.py \
53+ --replace "from orjson import dumps as orjson_dumps" "" \
54+ --replace "from orjson import loads as orjson_loads" ""
55+ '';
56+
57+ disabledTestPaths = [
58+ # Don't run benchmarking tests
59+ "bench/test_attrs_collections.py"
60+ "bench/test_attrs_nested.py"
61+ "bench/test_attrs_primitives.py"
62+ "bench/test_primitives.py"
63+ ];
64+
65+ disabledTests = [
66+ # orjson is not available as it requires Rust nightly features to compile its requirements
67+ "test_orjson"
2568 ];
2669
2770 pythonImportsCheck = [ "cattr" ];