Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 36e6c2888aa7
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b49be812b505
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 15, 2021

  1. 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.
    mweinelt committed Apr 15, 2021

    Verified

    This commit was signed with the committer’s verified signature.
    mweinelt Martin Weinelt
    Copy the full SHA
    b49be81 View commit details
Showing with 24 additions and 9 deletions.
  1. +24 −9 pkgs/development/python-modules/python-utils/default.nix
33 changes: 24 additions & 9 deletions pkgs/development/python-modules/python-utils/default.nix
Original file line number Diff line number Diff line change
@@ -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";