nixpkgs/pkgs/development/python-modules/python-utils/default.nix
Frederik Rietdijk 1623c8371c buildPythonPackage: rename nix_run_setup.py to nix_run_setup
If the extension is .py it tends to be picked up by tools, breaking for
example tests.
2018-01-20 13:31:14 +01:00

37 lines
928 B
Nix

{ lib, buildPythonPackage, fetchFromGitHub, pytest, pytestrunner, pytestcov, pytestflakes, pytestpep8, sphinx, six }:
buildPythonPackage rec {
pname = "python-utils";
version = "2.2.0";
name = pname + "-" + version;
src = fetchFromGitHub {
owner = "WoLpH";
repo = "python-utils";
rev = "v${version}";
sha256 = "1i3q9frai08nvrcmh4dg4rr0grncm68w2c097z5g1mfwdf9sv7df";
};
checkInputs = [ pytest pytestrunner pytestcov pytestflakes pytestpep8 sphinx ];
postPatch = ''
# pytest-runner is only actually required in checkPhase
substituteInPlace setup.py --replace "setup_requires=['pytest-runner']," ""
'';
# Tests failing
doCheck = false;
checkPhase = ''
py.test
'';
propagatedBuildInputs = [ six ];
meta = with lib; {
description = "Module with some convenient utilities";
homepage = "https://github.com/WoLpH/python-utils";
license = licenses.bsd3;
};
}