From 5cb6eeeb0a28b8aaf71312cb4c68b803ed3ac03b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 23 Mar 2025 17:42:15 +0100 Subject: [PATCH] python313Packages.django-modeltranslation: refactor --- .../django-modeltranslation/default.nix | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/django-modeltranslation/default.nix b/pkgs/development/python-modules/django-modeltranslation/default.nix index 885fafc661cc..0d50673fd183 100644 --- a/pkgs/development/python-modules/django-modeltranslation/default.nix +++ b/pkgs/development/python-modules/django-modeltranslation/default.nix @@ -1,23 +1,23 @@ { lib, buildPythonPackage, - fetchFromGitHub, - pythonOlder, - django, django-stubs, - pytestCheckHook, + django, + fetchFromGitHub, + parameterized, pytest-cov-stub, pytest-django, - parameterized, + pytestCheckHook, + pythonOlder, + setuptools, }: -let - # 0.18.12 was yanked from PyPI, it refers to this issue: - # https://github.com/deschler/django-modeltranslation/issues/701 - version = "0.19.13"; -in -buildPythonPackage { + +buildPythonPackage rec { pname = "django-modeltranslation"; - inherit version; + version = "0.19.13"; + pyproject = true; + + disabled = pythonOlder "3.11"; src = fetchFromGitHub { owner = "deschler"; @@ -26,9 +26,9 @@ buildPythonPackage { hash = "sha256-mn3dGSJbujULPT/PBAVvd1hlCukMItC4Z8dIZ+MWZ2w="; }; - disabled = pythonOlder "3.6"; + build-system = [ setuptools ]; - propagatedBuildInputs = [ django ]; + dependencies = [ django ]; nativeCheckInputs = [ django-stubs @@ -38,9 +38,12 @@ buildPythonPackage { parameterized ]; + pythonImportsCheck = [ "modeltranslation" ]; + meta = with lib; { description = "Translates Django models using a registration approach"; homepage = "https://github.com/deschler/django-modeltranslation"; + changelog = "https://github.com/deschler/django-modeltranslation/blob/v${src.tag}/CHANGELOG.md"; license = licenses.bsd3; maintainers = with maintainers; [ augustebaum ]; };