python3Packages.django-timezone-field: init at 4.2.1

This commit is contained in:
Martin Weinelt 2021-10-12 00:36:02 +02:00
parent 0a41e93ce4
commit e2c8c6ceeb
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759
2 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,62 @@
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, poetry-core
, django
, djangorestframework
, pytz
, pytest
, pytest-lazy-fixture
, python
}:
buildPythonPackage rec {
pname = "django-timezone-field";
version = "4.2.1";
format = "setuptools";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = "mfogel";
repo = pname;
rev = version;
sha256 = "0swld4168pfhppr9q3i9r062l832cmmx792kkvlcvxfbdhk6qz9h";
};
nativeBuildInputs = [
poetry-core
];
propagatedBuildInputs = [
django
djangorestframework
pytz
];
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";
checkInputs = [
pytest
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";
license = licenses.bsd2;
maintainers = with maintainers; [ hexa ];
};
}

View File

@ -2213,6 +2213,8 @@ in {
django-taggit = callPackage ../development/python-modules/django-taggit { }; django-taggit = callPackage ../development/python-modules/django-taggit { };
django-timezone-field = callPackage ../development/python-modules/django-timezone-field { };
django_treebeard = callPackage ../development/python-modules/django_treebeard { }; django_treebeard = callPackage ../development/python-modules/django_treebeard { };
django-versatileimagefield = callPackage ../development/python-modules/django-versatileimagefield { }; django-versatileimagefield = callPackage ../development/python-modules/django-versatileimagefield { };