0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 21:50:33 +03:00

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.
This commit is contained in:
Martin Weinelt 2021-04-15 02:42:30 +02:00
parent 36e6c2888a
commit b49be812b5
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -1,23 +1,38 @@
{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pytestrunner, pytestcov, pytest-flakes, sphinx, six }: { lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, six
}:
buildPythonPackage rec { buildPythonPackage rec {
pname = "python-utils"; pname = "python-utils";
version = "2.5.6"; version = "2.5.6";
src = fetchPypi { src = fetchFromGitHub {
inherit pname version; owner = "WoLpH";
sha256 = "352d5b1febeebf9b3cdb9f3c87a3b26ef22d3c9e274a8ec1e7048ecd2fac4349"; repo = pname;
rev = "v${version}";
sha256 = "0gd2jana5w6bn7z58di4a8dwcxvc8rx282jawbw7ws7qm2a5klz3";
}; };
# disable coverage and linting
postPatch = '' postPatch = ''
rm -r tests/__pycache__ sed -i '/--cov/d' pytest.ini
rm tests/*.pyc sed -i '/--flake8/d' pytest.ini
substituteInPlace pytest.ini --replace "--pep8" ""
''; '';
checkInputs = [ pytestCheckHook pytestrunner pytestcov pytest-flakes sphinx ]; propagatedBuildInputs = [
six
];
propagatedBuildInputs = [ six ]; checkInputs = [
pytestCheckHook
];
pytestFlagsArray = [
"_python_utils_tests"
];
meta = with lib; { meta = with lib; {
description = "Module with some convenient utilities"; description = "Module with some convenient utilities";