depot/third_party/nixpkgs/pkgs/development/python-modules/referencing/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

65 lines
1.3 KiB
Nix

{ lib
, attrs
, buildPythonPackage
, fetchFromGitHub
, hatch-vcs
, hatchling
, jsonschema
, pytest-subtests
, pytestCheckHook
, pythonOlder
, rpds-py
}:
let
self = buildPythonPackage rec {
pname = "referencing";
version = "0.31.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "python-jsonschema";
repo = "referencing";
rev = "refs/tags/v${version}";
fetchSubmodules = true;
hash = "sha256-6Kol8TdOxImRq0aff+aAR/jbDrkHX/EPrIv1ZEMRWZU=";
};
nativeBuildInputs = [
hatch-vcs
hatchling
];
propagatedBuildInputs = [
attrs
rpds-py
];
nativeCheckInputs = [
jsonschema
pytest-subtests
pytestCheckHook
];
# avoid infinite recursion with jsonschema
doCheck = false;
passthru.tests.referencing = self.overridePythonAttrs { doCheck = true; };
pythonImportsCheck = [
"referencing"
];
meta = with lib; {
description = "Cross-specification JSON referencing";
homepage = "https://github.com/python-jsonschema/referencing";
changelog = "https://github.com/python-jsonschema/referencing/blob/${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
};
in
self