Files
nixpkgs/pkgs/development/python-modules/jschon/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

82 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
wheel,
rfc3986,
pytestCheckHook,
hypothesis,
requests,
pytest-httpserver,
pytest-xdist,
}:
buildPythonPackage rec {
pname = "jschon";
version = "0.11.1";
pyproject = true;
src = fetchFromGitHub {
owner = "marksparkza";
repo = "jschon";
rev = "v${version}";
hash = "sha256-uOvEIEUEILsoLuV5U9AJCQAlT4iHQhsnSt65gfCiW0k=";
fetchSubmodules = true;
};
build-system = [
setuptools
wheel
];
dependencies = [
rfc3986
];
pythonImportsCheck = [
"jschon"
"jschon.catalog"
"jschon.vocabulary"
"jschon.exc"
"jschon.exceptions"
"jschon.formats"
"jschon.json"
"jschon.jsonpatch"
"jschon.jsonpointer"
"jschon.jsonschema"
"jschon.output"
"jschon.uri"
"jschon.utils"
];
nativeCheckInputs = [
pytestCheckHook
hypothesis
requests
pytest-httpserver
#pytest-benchmark # not needed for distribution
pytest-xdist # not used upstream, but massive speedup
];
disabledTests = [
# flaky, timing sensitive
"test_keyword_dependency_resolution"
];
disabledTestPaths = [
"tests/test_benchmarks.py"
];
# used in checks
__darwinAllowLocalNetworking = true;
meta = {
description = "Object-oriented JSON Schema implementation for Python";
homepage = "https://github.com/marksparkza/jschon";
changelog = "https://github.com/marksparkza/jschon/blob/${src.rev}/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pbsds ];
};
}