about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/aenum/default.nix
blob: 35ccf68808c393a205d6ffc52e4ee543aeb3b1fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, pyparsing
, python
}:

buildPythonPackage rec {
  pname = "aenum";
  version = "3.1.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-h/Dp70+ChXirBq8w5NeUQEO/Ts0/S3vRy+N+IXPN6Uo=";
  };

  checkInputs = [
    pyparsing
  ] ;

  # py2 likes to reorder tests
  doCheck = isPy3k;

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} aenum/test.py
    runHook postCheck
  '';

  pythonImportsCheck = [ "aenum" ];

  meta = with lib; {
    description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";
    maintainers = with maintainers; [ vrthra ];
    license = licenses.bsd3;
    homepage = "https://github.com/ethanfurman/aenum";
  };
}