Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / strenum / default.nix
blobb7d2661ce2c88aee36830c735d5f5dc5f3caa169
1 { lib
2 , buildPythonPackage
3 , fetchFromGitHub
4 , pytestCheckHook
5 , pythonOlder
6 }:
8 buildPythonPackage rec {
9   pname = "strenum";
10   version = "0.4.15";
11   format = "setuptools";
13   disabled = pythonOlder "3.7";
15   src = fetchFromGitHub {
16     owner = "irgeek";
17     repo = "StrEnum";
18     rev = "refs/tags/v${version}";
19     hash = "sha256-LrDLIWiV/zIbl7CwKh7DAy4LoLyY7+hfUu8nqduclnA=";
20   };
22   postPatch = ''
23     substituteInPlace setup.py \
24       --replace '"pytest-runner"' ""
25     substituteInPlace pytest.ini \
26       --replace " --cov=strenum --cov-report term-missing --black --pylint" ""
27   '';
29   nativeCheckInputs = [
30     pytestCheckHook
31   ];
33   pythonImportsCheck = [
34     "strenum"
35   ];
37   meta = with lib; {
38     description = "MOdule for enum that inherits from str";
39     homepage = "https://github.com/irgeek/StrEnum";
40     changelog = "https://github.com/irgeek/StrEnum/releases/tag/v${version}";
41     license = with licenses; [ mit ];
42     maintainers = with maintainers; [ fab ];
43   };