1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-15 17:25:11 +00:00
nixpkgs/pkgs/development/python-modules/aenum/default.nix
2018-02-18 20:07:42 +01:00

32 lines
912 B
Nix

{ stdenv, fetchPypi, buildPythonPackage, python, isPy3k, glibcLocales }:
buildPythonPackage rec {
pname = "aenum";
version = "2.1.0";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "9eb1c8f48ae13c56d22a7227db0e4b1717131b284c6c0db6e4ccca6f5894df95";
};
# For Python 3, locale has to be set to en_US.UTF-8 for
# tests to pass
checkInputs = if isPy3k then [ glibcLocales ] else [];
checkPhase = ''
runHook preCheck
${if isPy3k then "export LC_ALL=en_US.UTF-8" else ""}
PYTHONPATH=`pwd` ${python.interpreter} aenum/test.py
runHook postCheck
'';
meta = {
description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants";
maintainers = with stdenv.lib.maintainers; [ vrthra ];
license = with stdenv.lib.licenses; [ bsd3 ];
homepage = https://bitbucket.org/stoneleaf/aenum;
};
}