0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

python310Packages.jsonpatch: enable tests

- add pythonImportsCheck
- disable on obsolete Python releases
This commit is contained in:
Fabian Affolter 2022-06-07 10:43:00 +02:00
parent 0dbb26a391
commit 13a4a8702c

View file

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