18 buildPythonPackage rec {
19 pname = "python-redis-lock";
24 disabled = pythonOlder "3.7";
27 inherit pname version;
28 hash = "sha256-Sr0Lz0kTasrWZye/VIbdJJQHjKVeSe+mk/eUB3MZCRo=";
33 substituteInPlace tests/test_project/settings.py \
34 --replace-fail "USE_L10N = True" ""
38 # https://github.com/ionelmc/python-redis-lock/pull/119
40 url = "https://github.com/ionelmc/python-redis-lock/commit/ae404b7834990b833c1f0f703ec8fbcfecd201c2.patch";
41 hash = "sha256-Fo43+pCtnrEMxMdEEdo0YfJGkBlhhH0GjYNgpZeHF3U=";
43 ./test_signal_expiration_increase_sleep.patch
46 build-system = [ setuptools ];
48 dependencies = [ redis ];
50 optional-dependencies.django = [ django-redis ];
58 ] ++ optional-dependencies.django;
61 preCheck = "export DJANGO_SETTINGS_MODULE=test_project.settings";
63 disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
64 # fail on Darwin because it defaults to multiprocessing `spawn`
65 "test_reset_signalizes"
66 "test_reset_all_signalizes"
69 pythonImportsCheck = [ "redis_lock" ];
72 changelog = "https://github.com/ionelmc/python-redis-lock/blob/v${version}/CHANGELOG.rst";
73 description = "Lock context manager implemented via redis SETNX/BLPOP";
74 homepage = "https://github.com/ionelmc/python-redis-lock";
75 license = licenses.bsd2;
76 maintainers = with maintainers; [ erictapen ];