Merge pull request #325608 from erictapen/python-django-timezone-field

python3Packages.django-timezone-field: 5.1 -> 7.0
This commit is contained in:
Martin Weinelt
2024-07-09 14:25:41 +02:00
committed by GitHub
@@ -6,50 +6,45 @@
poetry-core,
django,
djangorestframework,
pytz,
pytest,
pytestCheckHook,
pytest-django,
pytest-lazy-fixture,
python,
}:
buildPythonPackage rec {
pname = "django-timezone-field";
version = "5.1";
disabled = pythonOlder "3.5";
format = "pyproject";
version = "7.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "mfogel";
repo = pname;
rev = version;
hash = "sha256-FAYO8OEE/h4rsbC4Oc57ylWV7TqQ6DOd6/2M+mb/AsM=";
hash = "sha256-q06TuYkBA4z6tJdT3an6Z8o1i/o85XbYa1JYZBHC8lI=";
};
nativeBuildInputs = [ poetry-core ];
build-system = [ poetry-core ];
propagatedBuildInputs = [
django
djangorestframework
pytz
dependencies = [ django ];
pythonImportsCheck = [
# Requested setting USE_DEPRECATED_PYTZ, but settings are not configured.
#"timezone_field"
];
pythonImportsCheck = [ "timezone_field" ];
# Uses pytest.lazy_fixture directly which is broken in pytest-lazy-fixture
# https://github.com/TvoroG/pytest-lazy-fixture/issues/22
doCheck = false;
DJANGO_SETTINGS_MODULE = "tests.settings";
preCheck = ''
export DJANGO_SETTINGS_MODULE=tests.settings
'';
nativeCheckInputs = [
pytest
djangorestframework
pytestCheckHook
pytest-django
pytest-lazy-fixture
];
checkPhase = ''
${python.interpreter} -m django test
'';
meta = with lib; {
description = "Django app providing database, form and serializer fields for pytz timezone objects";
homepage = "https://github.com/mfogel/django-timezone-field";