Unverified Commit eff9c3d6 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

python312Packages.django-health-check: refactor (#386776)

parents 50058dd8 01ca5699
Loading
Loading
Loading
Loading
+16 −23
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  boto3,
  buildPythonPackage,
  sphinx,
  setuptools-scm,
  django,
  redis,
  celery,
  boto3,
  django-storages,
  django,
  fetchFromGitHub,
  gitMinimal,
  mock,
  pytest-cov-stub,
  pytest-django,
  pytestCheckHook,
  mock,
  gitMinimal,
  redis,
  setuptools-scm,
  sphinx,
}:

buildPythonPackage rec {
  pname = "django-health-check";
  version = "3.18.3";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "KristianOellegaard";
    repo = pname;
    repo = "django-health-check";
    tag = version;
    hash = "sha256-+6+YxB/x4JdKUCwxxe+YIc+r1YAzngFUHiS6atupWM8=";
  };

  build-system = [ setuptools-scm ];

  buildInputs = [
    sphinx
    django
  ];

  nativeBuildInputs = [
    setuptools-scm
    gitMinimal
  ];
  nativeBuildInputs = [ gitMinimal ];

  nativeCheckInputs = [
    boto3
    django-storages
    pytest-cov-stub
    pytest-django
    pytestCheckHook
    mock
@@ -52,20 +53,12 @@ buildPythonPackage rec {
    "test_command_with_non_existence_subset"
  ];

  postPatch = ''
    # We don't want to generate coverage
    substituteInPlace setup.cfg \
      --replace "pytest-runner" "" \
      --replace "--cov=health_check" "" \
      --replace "--cov-report=term" "" \
      --replace "--cov-report=xml" ""
  '';

  pythonImportsCheck = [ "health_check" ];

  meta = with lib; {
    description = "Pluggable app that runs a full check on the deployment";
    homepage = "https://github.com/KristianOellegaard/django-health-check";
    changelog = "https://github.com/revsys/django-health-check/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ onny ];
  };