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