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:
parent
36e6c2888a
commit
b49be812b5
1 changed files with 24 additions and 9 deletions
|
@ -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";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue