summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/python-utils
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2021-04-15 02:42:30 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2021-04-15 02:42:30 +0200
commitb49be812b505e4afe8ea75056e7915b021615192 (patch)
tree1277e6297ea206fa895d226417fadc9d890b5a27 /pkgs/development/python-modules/python-utils
parent36e6c2888aa7845f9fee1b55ad0a542f92bc9cee (diff)
python3Packages.python-utils: fix build
Tests have been excluded from the pypi package, hence we fetch the source from GitHub now. Disable coverage and linting, drop unused dependencies.
Diffstat (limited to 'pkgs/development/python-modules/python-utils')
-rw-r--r--pkgs/development/python-modules/python-utils/default.nix33
1 files changed, 24 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/python-utils/default.nix b/pkgs/development/python-modules/python-utils/default.nix
index 637c25cc5aab..f11ce745fed9 100644
--- a/pkgs/development/python-modules/python-utils/default.nix
+++ b/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.5.6";
- src = fetchPypi {
- inherit pname version;
- sha256 = "352d5b1febeebf9b3cdb9f3c87a3b26ef22d3c9e274a8ec1e7048ecd2fac4349";
+ 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";