python3Packages.djangorestframework: disable pytz when django >= 5

The use of pytz is deprecated for Django >= 4
and removed for Django >= 5.
Building djangorestframework with django_5 and pytz caused test failures.

And add pytz back in django-timezone-field as native check input
This commit is contained in:
Minijackson
2024-08-02 09:16:39 +02:00
parent 130e852f92
commit 1094ca551b
3 changed files with 6 additions and 7 deletions
@@ -7,6 +7,7 @@
djangorestframework,
pytestCheckHook,
pytest-django,
pytz,
}:
buildPythonPackage rec {
@@ -29,6 +30,7 @@ buildPythonPackage rec {
djangorestframework
pytestCheckHook
pytest-django
pytz
];
env.DJANGO_SETTINGS_MODULE = "tests.settings";
@@ -9,6 +9,7 @@
pytestCheckHook,
pytest-django,
pytest-lazy-fixture,
pytz,
}:
buildPythonPackage rec {
@@ -43,6 +44,7 @@ buildPythonPackage rec {
pytestCheckHook
pytest-django
pytest-lazy-fixture
pytz
];
meta = with lib; {
@@ -35,14 +35,9 @@ buildPythonPackage rec {
hash = "sha256-G914NvxRmKGkxrozoWNUIoI74YkYRbeNcQwIG4iSeXU=";
};
build-system = [
setuptools
];
build-system = [ setuptools ];
dependencies = [
django
pytz
];
dependencies = [ django ] ++ (lib.optional (lib.versionOlder django.version "5.0.0") pytz);
nativeCheckInputs = [
pytest-django