Unverified Commit 51bd9fed authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

python312Packages.asteval: migrate to pytest-cov-stub (#386771)

parents 76831d47 1ee72631
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytest-cov-stub,
  pytestCheckHook,
  pythonOlder,
  setuptools-scm,
@@ -12,7 +13,7 @@ buildPythonPackage rec {
  version = "1.0.6";
  pyproject = true;

  disabled = pythonOlder "3.8";
  disabled = pythonOlder "3.9";

  src = fetchFromGitHub {
    owner = "lmfit";
@@ -21,14 +22,12 @@ buildPythonPackage rec {
    hash = "sha256-DzLVe8TlWAPQXzai9CJlDAow6UTSmkA/DW3fT30YfZY=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "--cov=asteval --cov-report html" ""
  '';

  build-system = [ setuptools-scm ];

  nativeCheckInputs = [ pytestCheckHook ];
  nativeCheckInputs = [
    pytest-cov-stub
    pytestCheckHook
  ];

  pythonImportsCheck = [ "asteval" ];

@@ -41,7 +40,7 @@ buildPythonPackage rec {
    description = "AST evaluator of Python expression using ast module";
    homepage = "https://github.com/lmfit/asteval";
    changelog = "https://github.com/lmfit/asteval/releases/tag/${version}";
    license = with licenses; [ mit ];
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}