Commit 834d5b1a authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.django-modelcluster: refactor

- add changelog to meta
- update disabled
- enable all tests
- remove superfluous commets
parent 13b932f7
Loading
Loading
Loading
Loading
+12 −17
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pythonOlder,

  # dependencies
  django,
  pytz,

  # optionals
  django-taggit,

  # tests
  django,
  fetchFromGitHub,
  pytest-django,
  pytestCheckHook,
  pythonOlder,
  pytz,
  setuptools,
}:

buildPythonPackage rec {
  pname = "django-modelcluster";
  version = "6.3";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.5";
  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "wagtail";
@@ -30,7 +25,9 @@ buildPythonPackage rec {
    hash = "sha256-AUVl2aidjW7Uu//3HlAod7pxzj6Gs1Xd0uTt3NrrqAU=";
  };

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  dependencies = [
    django
    pytz
  ];
@@ -44,14 +41,12 @@ buildPythonPackage rec {
    pytestCheckHook
  ] ++ optional-dependencies.taggit;

  # https://github.com/wagtail/django-modelcluster/issues/173
  disabledTests = lib.optionals (lib.versionAtLeast django.version "4.2") [
    "test_formfield_callback"
  ];
  pythonImportsCheck = [ "modelcluster" ];

  meta = with lib; {
    description = "Django extension to allow working with 'clusters' of models as a single unit, independently of the database";
    homepage = "https://github.com/torchbox/django-modelcluster/";
    changelog = "https://github.com/wagtail/django-modelcluster/blob/v${version}/CHANGELOG.txt";
    license = licenses.bsd2;
    maintainers = with maintainers; [ desiderius ];
  };