From bde9bd867b29d29445231cb60ab7a4f8757fbc19 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 10 Feb 2022 13:24:20 +0100 Subject: [PATCH] python310Packages.strenum: init at 0.4.7 --- .../python-modules/strenum/default.nix | 43 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/development/python-modules/strenum/default.nix diff --git a/pkgs/development/python-modules/strenum/default.nix b/pkgs/development/python-modules/strenum/default.nix new file mode 100644 index 000000000000..f287b2623a6b --- /dev/null +++ b/pkgs/development/python-modules/strenum/default.nix @@ -0,0 +1,43 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "strenum"; + version = "0.4.7"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "irgeek"; + repo = "StrEnum"; + rev = "v${version}"; + hash = "sha256-ktsPROIv/BbPinZfrBknI4c/WwRYGhWgmw209Hfg8EQ="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace '"pytest-runner"' "" + substituteInPlace pytest.ini \ + --replace " --cov=strenum --cov-report term-missing --black --pylint" "" + ''; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "strenum" + ]; + + meta = with lib; { + description = "MOdule for enum that inherits from str"; + homepage = "https://github.com/irgeek/StrEnum"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e2f2fb9a9620..3f531602bc68 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9494,6 +9494,8 @@ in { streamz = callPackage ../development/python-modules/streamz { }; + strenum = callPackage ../development/python-modules/strenum { }; + strict-rfc3339 = callPackage ../development/python-modules/strict-rfc3339 { }; strictyaml = callPackage ../development/python-modules/strictyaml { };