1{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }: 2 3buildPythonPackage rec { 4 pname = "aenum"; 5 version = "2.1.2"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "a3208e4b28db3a7b232ff69b934aef2ea1bf27286d9978e1e597d46f490e4687"; 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 checkPhase = '' 17 runHook preCheck 18 ${if isPy3k then "export LC_ALL=en_US.UTF-8" else ""} 19 PYTHONPATH=`pwd` ${python.interpreter} aenum/test.py 20 runHook postCheck 21 ''; 22 23 24 meta = { 25 description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"; 26 maintainers = with stdenv.lib.maintainers; [ vrthra ]; 27 license = with stdenv.lib.licenses; [ bsd3 ]; 28 homepage = https://bitbucket.org/stoneleaf/aenum; 29 }; 30}