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