Unverified Commit 5a01208e authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #242542 from blaggacao/init-python-annotated-types

parents 33fac37e 495b199f
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, typing-extensions
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  pname = "annotated-types";
  version = "0.5.0";
  format = "pyproject";

  src = fetchFromGitHub {
    owner = "annotated-types";
    repo = "annotated-types";
    rev = "v${version}";
    hash = "sha256-zCsWfJ8BQuov8FN+hlm9XBKWAAQ/KHPK/x024A8k2kE=";
  };

  nativeBuildInputs = [
    hatchling
  ];

  propagatedBuildInputs = lib.optionals (pythonOlder "3.9") [
    typing-extensions
  ];

  pythonImportsCheck = [ "annotated_types" ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  meta = with lib; {
    description = "Reusable constraint types to use with typing.Annotated";
    homepage = "https://github.com/annotated-types/annotated-types";
    changelog = "https://github.com/annotated-types/annotated-types/releases/tag/${src.rev}";
    license = licenses.mit;
    maintainers = with maintainers; [ blaggacao ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -488,6 +488,8 @@ self: super: with self; {

  annexremote = callPackage ../development/python-modules/annexremote { };

  annotated-types = callPackage ../development/python-modules/annotated-types { };

  annoy = callPackage ../development/python-modules/annoy { };

  anonip = callPackage ../development/python-modules/anonip { };