1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 14:47:06 +00:00
nixpkgs/pkgs/development/python-modules/konfig/default.nix

49 lines
1.3 KiB
Nix
Raw Normal View History

2018-02-22 00:22:48 +00:00
{ lib, buildPythonPackage, fetchFromGitHub, isPy3k, writeText, configparser, six, pytest, glibcLocales }:
2018-02-22 00:15:10 +00:00
buildPythonPackage rec {
pname = "konfig";
version = "1.1";
# konfig unconditionaly depend on configparser, even if it is part of
# the standard library in python 3.2 or above.
disabled = isPy3k;
2018-02-22 00:22:48 +00:00
# PyPI tarball is missing utf8.ini, required for tests
src = fetchFromGitHub {
owner = "mozilla-services";
repo = pname;
rev = version;
sha256 = "1h780fbrv275dcik4cs3rincza805z6q726b48r4a0qmh5d8160c";
2018-02-22 00:15:10 +00:00
};
propagatedBuildInputs = [ configparser six ];
patches = [ (writeText "konfig.patch" ''
diff --git a/setup.py b/setup.py
index 96fd858..bb4db06 100644
--- a/setup.py
+++ b/setup.py
@@ -20,7 +20,7 @@ setup(name='konfig',
author_email="tarek@mozilla.com",
include_package_data=True,
install_requires = [
- 'configparser', 'argparse', 'six'
+ 'configparser', 'six'
],
zip_safe=False,
classifiers=classifiers,
'') ];
2018-02-22 00:22:48 +00:00
checkInputs = [ pytest glibcLocales ];
checkPhase = ''
LC_ALL=en_US.utf8 pytest -v konfig/tests
'';
2018-02-22 00:15:10 +00:00
meta = with lib; {
description = "Yet Another Config Parser";
homepage = "https://github.com/mozilla-services/konfig";
license = licenses.mpl20;
};
}