Unverified Commit 8d9c2111 authored by Kerstin's avatar Kerstin Committed by GitHub
Browse files

python3Packages.scim2-models: fix doc test; build from source (#479342)

parents 25aeabae 2cd5fc15
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchPypi,
  fetchFromGitHub,
  hatchling,
  pydantic,
  pytestCheckHook,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "scim2-models";
  version = "0.4.1";

  pyproject = true;

  src = fetchPypi {
    inherit version;
    pname = "scim2_models";
    hash = "sha256-SRUPO67otfZsrdjGQyTul5vIrYRU2WFaL0fvAtVd/1c=";
  src = fetchFromGitHub {
    owner = "python-scim";
    repo = "scim2-models";
    tag = finalAttrs.version;
    hash = "sha256-cc9nSqED+gfBHC3QpeHnQ6lBnmvdHa6edp/WGiuiDfc=";
  };

  build-system = [ hatchling ];
@@ -25,13 +26,18 @@ buildPythonPackage rec {

  nativeCheckInputs = [ pytestCheckHook ];

  preCheck = ''
    substituteInPlace doc/tutorial.rst \
      --replace-fail "TzInfo(UTC)" "TzInfo(0)"
  '';

  pythonImportsCheck = [ "scim2_models" ];

  meta = {
    description = "SCIM2 models serialization and validation with pydantic";
    homepage = "https://github.com/python-scim/scim2-models";
    changelog = "https://github.com/python-scim/scim2-models/releases/tag/${version}";
    changelog = "https://github.com/python-scim/scim2-models/releases/tag/${finalAttrs.version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ erictapen ];
  };
}
})