python3.pkgs.django-cacheops: update, fix build, refactor to run all tests

This commit is contained in:
Yureka 2023-07-12 19:06:55 +02:00
parent 89c6513921
commit 1f8e1307f7

View file

@ -1,27 +1,39 @@
{ lib { lib
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
, pythonRelaxDepsHook
, django , django
, funcy , funcy
, redis , redis
, pytest-django
, pytestCheckHook
, pythonOlder
, six , six
, pytestCheckHook
, pytest-django
, mock
, dill
, jinja2
, before-after
, pythonOlder
, nettools
, pkgs
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "django-cacheops"; pname = "django-cacheops";
version = "6.2"; version = "7.0.1";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7"; disabled = pythonOlder "3.7";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-zHP9ChwUeZJT/yCopFeRo8jSgCIXswHnDPoIroGeQ48="; hash = "sha256-Ed3qh90DlWiXikCD2JyJ37hm6lWnpI+2haaPwZiotlA=";
}; };
nativeBuildInputs = [
pythonRelaxDepsHook
];
pythonRelaxDeps = [ "funcy" ];
propagatedBuildInputs = [ propagatedBuildInputs = [
django django
funcy funcy
@ -32,23 +44,21 @@ buildPythonPackage rec {
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook pytestCheckHook
pytest-django pytest-django
mock
dill
jinja2
before-after
nettools
pkgs.redis
]; ];
disabledTests = [ preCheck = ''
# Tests require networking redis-server &
"test_cached_as" while ! redis-cli --scan ; do
"test_invalidation_signal" echo waiting for redis to be ready
"test_queryset" sleep 1
"test_queryset_empty" done
"test_lock" '';
"test_context_manager"
"test_decorator"
"test_in_transaction"
"test_nested"
"test_unhashable_args"
"test_db_agnostic_by_default"
"test_db_agnostic_disabled"
];
DJANGO_SETTINGS_MODULE = "tests.settings"; DJANGO_SETTINGS_MODULE = "tests.settings";
@ -58,8 +68,5 @@ buildPythonPackage rec {
changelog = "https://github.com/Suor/django-cacheops/blob/${version}/CHANGELOG"; changelog = "https://github.com/Suor/django-cacheops/blob/${version}/CHANGELOG";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = with maintainers; [ onny ]; maintainers = with maintainers; [ onny ];
# No support for funcy > 2
# https://github.com/Suor/django-cacheops/issues/454
broken = true;
}; };
} }