Skip to content

Commit

Permalink
python312Packages.django-modelcluster: refactor (#351595)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored Oct 28, 2024
2 parents 8e2c710 + 834d5b1 commit 6294c24
Showing 1 changed file with 12 additions and 17 deletions.
29 changes: 12 additions & 17 deletions pkgs/development/python-modules/django-modelcluster/default.nix
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
{
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";
Expand All @@ -30,7 +25,9 @@ buildPythonPackage rec {
hash = "sha256-AUVl2aidjW7Uu//3HlAod7pxzj6Gs1Xd0uTt3NrrqAU=";
};

propagatedBuildInputs = [
build-system = [ setuptools ];

dependencies = [
django
pytz
];
Expand All @@ -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 ];
};
Expand Down

0 comments on commit 6294c24

Please sign in to comment.