forked from mirrors/nixpkgs
python3Packages.cattrs: 1.8.0 -> 1.10.0
This commit is contained in:
parent
825deacec2
commit
58dd3b0348
|
@ -11,23 +11,22 @@
|
|||
, pythonOlder
|
||||
, pyyaml
|
||||
, tomlkit
|
||||
, typing-extensions
|
||||
, ujson
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "cattrs";
|
||||
version = "1.8.0";
|
||||
version = "1.10.0";
|
||||
format = "pyproject";
|
||||
|
||||
# https://cattrs.readthedocs.io/en/latest/history.html#id33:
|
||||
# "Python 2, 3.5 and 3.6 support removal. If you need it, use a version below 1.1.0."
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Tinche";
|
||||
owner = "python-attrs";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-CKAsvRKS8kmLcyPA753mh6d3S04ObzO7xLPpmlmxrxI=";
|
||||
hash = "sha256-VbfQMMDO03eeUHAACxoX6a3DKmzoF9EfLuTpvaY6bWs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -36,6 +35,8 @@ buildPythonPackage rec {
|
|||
|
||||
propagatedBuildInputs = [
|
||||
attrs
|
||||
] ++ lib.optionals (pythonOlder "3.7") [
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
|
@ -50,10 +51,10 @@ buildPythonPackage rec {
|
|||
];
|
||||
|
||||
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"' ""
|
||||
--replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" "" \
|
||||
--replace 'orjson = "^3.5.2"' "" \
|
||||
--replace "[tool.poetry.group.dev.dependencies]" "[tool.poetry.dev-dependencies]"
|
||||
substituteInPlace tests/test_preconf.py \
|
||||
--replace "from orjson import dumps as orjson_dumps" "" \
|
||||
--replace "from orjson import loads as orjson_loads" ""
|
||||
|
@ -76,11 +77,13 @@ buildPythonPackage rec {
|
|||
"test_orjson"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "cattr" ];
|
||||
pythonImportsCheck = [
|
||||
"cattr"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python custom class converters for attrs";
|
||||
homepage = "https://github.com/Tinche/cattrs";
|
||||
homepage = "https://github.com/python-attrs/cattrs";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue