python310Packages.jsonpatch: enable tests

- add pythonImportsCheck
- disable on obsolete Python releases
main
Fabian Affolter 2 years ago
parent 0dbb26a391
commit 13a4a8702c
  1. 38
      pkgs/development/python-modules/jsonpatch/default.nix

@ -1,25 +1,45 @@
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, jsonpointer
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "jsonpatch";
version = "1.32";
format = "setuptools";
src = fetchPypi {
inherit pname version;
sha256 = "b6ddfe6c3db30d81a96aaeceb6baf916094ffa23d7dd5fa2c13e13f8b6e600c2";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "stefankoegl";
repo = "python-json-patch";
rev = "v${version}";
hash = "sha256-JMGBgYjnjHQ5JpzDwJcR2nVZfzmQ8ZZtcB0GsJ9Q4Jc=";
};
# test files are missing
doCheck = false;
propagatedBuildInputs = [ jsonpointer ];
propagatedBuildInputs = [
jsonpointer
];
checkInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"jsonpatch"
];
pytestFlagsArray = [
"tests.py"
];
meta = {
meta = with lib; {
description = "Library to apply JSON Patches according to RFC 6902";
homepage = "https://github.com/stefankoegl/python-json-patch";
license = lib.licenses.bsd2; # "Modified BSD license, says pypi"
license = licenses.bsd2; # "Modified BSD license, says pypi"
maintainers = with maintainers; [ ];
};
}

Loading…
Cancel
Save