about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/python-utils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/python-utils/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/python-utils/default.nix35
1 files changed, 25 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/python-utils/default.nix b/nixpkgs/pkgs/development/python-modules/python-utils/default.nix
index 60160d270b75..f11ce745fed9 100644
--- a/nixpkgs/pkgs/development/python-modules/python-utils/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/python-utils/default.nix
@@ -1,23 +1,38 @@
-{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pytestrunner, pytestcov, pytest-flakes, sphinx, six }:
+{ lib
+, buildPythonPackage
+, fetchFromGitHub
+, pytestCheckHook
+, six
+}:
 
 buildPythonPackage rec {
   pname = "python-utils";
-  version = "2.4.0";
+  version = "2.5.6";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj";
+  src = fetchFromGitHub {
+    owner = "WoLpH";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "0gd2jana5w6bn7z58di4a8dwcxvc8rx282jawbw7ws7qm2a5klz3";
   };
 
+  # disable coverage and linting
   postPatch = ''
-    rm -r tests/__pycache__
-    rm tests/*.pyc
-    substituteInPlace pytest.ini --replace "--pep8" ""
+    sed -i '/--cov/d' pytest.ini
+    sed -i '/--flake8/d' pytest.ini
   '';
 
-  checkInputs = [ pytestCheckHook pytestrunner pytestcov pytest-flakes sphinx ];
+  propagatedBuildInputs = [
+    six
+  ];
 
-  propagatedBuildInputs = [ six ];
+  checkInputs = [
+    pytestCheckHook
+  ];
+
+  pytestFlagsArray = [
+    "_python_utils_tests"
+  ];
 
   meta = with lib; {
     description = "Module with some convenient utilities";