Unverified Commit 11bd4d83 authored by Bernardo Meurer's avatar Bernardo Meurer Committed by GitHub
Browse files

pycobertura: init at 4.1.0 (#451248)

parents 63492318 68cd7c83
Loading
Loading
Loading
Loading
+73 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,
  setuptools,
  setuptools-git,
  click,
  jinja2,
  lxml,
  tabulate,
  ruamel-yaml,
  pytestCheckHook,
  mock,
}:

buildPythonPackage rec {
  pname = "pycobertura";
  version = "4.1.0";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "aconrad";
    repo = "pycobertura";
    tag = "v${version}";
    hash = "sha256-OzOxoF3OmgtzWuNNyecyxFRcPq8gAPQZ2XAdrkJjnhk=";
  };

  postPatch = ''
    # Remove build-system requirements as we handle them through Nix
    sed -i '/\[build-system\]/,/build-backend/d' pyproject.toml
  '';

  build-system = [
    setuptools
    setuptools-git
  ];

  dependencies = [
    click
    jinja2
    lxml
    tabulate
    ruamel-yaml
  ];

  nativeCheckInputs = [
    pytestCheckHook
    mock
  ];

  disabledTests = [
    # Tests require git and a git repository
    "test_filesystem_git_integration"
    "test_filesystem_git_integration__not_found"
    "test_filesystem_git_has_file_integration"
    "test_filesystem_git_has_file_integration__not_found"
    "test_filesystem_factory"
  ];

  pythonImportsCheck = [ "pycobertura" ];

  meta = {
    description = "Cobertura coverage parser that can diff reports and show coverage progress";
    homepage = "https://github.com/aconrad/pycobertura";
    changelog = "https://github.com/aconrad/pycobertura/blob/${version}/CHANGES.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ lovesegfault ];
    mainProgram = "pycobertura";
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -6810,6 +6810,8 @@ with pkgs;

  premake = premake4;

  pycobertura = with python3Packages; toPythonApplication pycobertura;

  pycritty = with python3Packages; toPythonApplication pycritty;

  qtcreator = qt6Packages.callPackage ../development/tools/qtcreator {
+2 −0
Original line number Diff line number Diff line
@@ -12766,6 +12766,8 @@ self: super: with self; {
  pycmus = callPackage ../development/python-modules/pycmus { };
  pycobertura = callPackage ../development/python-modules/pycobertura { };
  pycocotools = callPackage ../development/python-modules/pycocotools { };
  pycodestyle = callPackage ../development/python-modules/pycodestyle { };