1{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }:
2
3buildPythonPackage rec {
4 pname = "aenum";
5 version = "2.2.4";
6
7 src = fetchPypi {
8 inherit pname version;
9 sha256 = "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1";
10 };
11
12 # For Python 3, locale has to be set to en_US.UTF-8 for
13 # tests to pass
14 checkInputs = if isPy3k then [ glibcLocales ] else [];
15
16 # py2 likes to reorder tests
17 doCheck = isPy3k;
18 checkPhase = ''
19 runHook preCheck
20 ${if isPy3k then "export LC_ALL=en_US.UTF-8" else ""}
21 PYTHONPATH=`pwd` ${python.interpreter} aenum/test.py
22 runHook postCheck
23 '';
24
25
26 meta = {
27 description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";
28 maintainers = with stdenv.lib.maintainers; [ vrthra ];
29 license = with stdenv.lib.licenses; [ bsd3 ];
30 homepage = "https://bitbucket.org/stoneleaf/aenum";
31 };
32}