Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.03 32 lines 931 B view raw
1{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }: 2 3buildPythonPackage rec { 4 pname = "aenum"; 5 version = "2.2.3"; 6 7 src = fetchPypi { 8 inherit pname version; 9 sha256 = "a4334cabf47c167d44ab5a6198837b80deec5d5bad1b5cf70c966c3a330260e8"; 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}