depot/third_party/nixpkgs/pkgs/development/python-modules/strenum/default.nix
Default email 410b979fe2 Project import generated by Copybara.
GitOrigin-RevId: a64e169e396460d6b5763a1de1dd197df8421688
2023-03-24 01:07:29 +01:00

44 lines
989 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "strenum";
version = "0.4.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "irgeek";
repo = "StrEnum";
rev = "refs/tags/v${version}";
hash = "sha256-OkNV4kUXGgYPGuyylGOtAr0e0spgZQ1MrftKKL2HmV8=";
};
postPatch = ''
substituteInPlace setup.py \
--replace '"pytest-runner"' ""
substituteInPlace pytest.ini \
--replace " --cov=strenum --cov-report term-missing --black --pylint" ""
'';
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"strenum"
];
meta = with lib; {
description = "MOdule for enum that inherits from str";
homepage = "https://github.com/irgeek/StrEnum";
changelog = "https://github.com/irgeek/StrEnum/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}