Merge pull request #129181 from fabaff/bump-cattrs
This commit is contained in:
commit
703f8b5afb
33
pkgs/development/python-modules/bson/default.nix
Normal file
33
pkgs/development/python-modules/bson/default.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, python-dateutil
|
||||||
|
, six
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "bson";
|
||||||
|
version = "0.5.10";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "14355m3dchz446fl54ym78bn4wi20hddx1614f8rl4sin0m1nlfn";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
python-dateutil
|
||||||
|
six
|
||||||
|
];
|
||||||
|
|
||||||
|
# 0.5.10 was not tagged, https://github.com/py-bson/bson/issues/108
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "bson" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "BSON codec for Python";
|
||||||
|
homepage = "https://github.com/py-bson/bson";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ fab ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,27 +1,70 @@
|
||||||
{ lib
|
{ lib
|
||||||
, attrs
|
, attrs
|
||||||
|
, bson
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, hypothesis
|
, hypothesis
|
||||||
|
, immutables
|
||||||
|
, msgpack
|
||||||
|
, poetry-core
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
|
, pyyaml
|
||||||
|
, tomlkit
|
||||||
|
, ujson
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "cattrs";
|
pname = "cattrs";
|
||||||
version = "1.1.2";
|
version = "1.7.0";
|
||||||
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Tinche";
|
owner = "Tinche";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "083d5mi6x7qcl26wlvwwn7gsp5chxlxkh4rp3a41w8cfwwr3h6l8";
|
sha256 = "sha256-7F4S4IeApbULXhkEZ0oab3Y7sk20Ag2fCYxsyi4WbWw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ attrs ];
|
nativeBuildInputs = [
|
||||||
|
poetry-core
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
attrs
|
||||||
|
];
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
|
bson
|
||||||
hypothesis
|
hypothesis
|
||||||
|
immutables
|
||||||
|
msgpack
|
||||||
pytestCheckHook
|
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" ];
|
pythonImportsCheck = [ "cattr" ];
|
||||||
|
|
|
@ -1218,6 +1218,8 @@ in {
|
||||||
|
|
||||||
bsblan = callPackage ../development/python-modules/bsblan { };
|
bsblan = callPackage ../development/python-modules/bsblan { };
|
||||||
|
|
||||||
|
bson = callPackage ../development/python-modules/bson { };
|
||||||
|
|
||||||
btchip = callPackage ../development/python-modules/btchip { };
|
btchip = callPackage ../development/python-modules/btchip { };
|
||||||
|
|
||||||
bt-proximity = callPackage ../development/python-modules/bt-proximity { };
|
bt-proximity = callPackage ../development/python-modules/bt-proximity { };
|
||||||
|
|
Loading…
Reference in a new issue