Merge pull request #212471 from fabaff/python-redis-lock-fix

python310Packages.python-redis-lock: adjust inputs
This commit is contained in:
Fabian Affolter 2023-01-25 01:06:44 +01:00 committed by GitHub
commit 401388d2dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,28 +1,39 @@
{ lib
, stdenv
, buildPythonPackage
, eventlet
, fetchPypi
, redis
, pytestCheckHook
, process-tests
, gevent
, pkgs
, withDjango ? false, django-redis
, process-tests
, pytestCheckHook
, pythonOlder
, redis
, withDjango ? false
, django-redis
}:
buildPythonPackage rec {
pname = "python-redis-lock";
version = "4.0.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-Sr0Lz0kTasrWZye/VIbdJJQHjKVeSe+mk/eUB3MZCRo=";
hash = "sha256-Sr0Lz0kTasrWZye/VIbdJJQHjKVeSe+mk/eUB3MZCRo=";
};
propagatedBuildInputs = [
redis
] ++ lib.optional withDjango django-redis;
] ++ lib.optional withDjango [
django-redis
];
nativeCheckInputs = [
eventlet
gevent
pytestCheckHook
process-tests
pkgs.redis
@ -37,10 +48,15 @@ buildPythonPackage rec {
"test_reset_all_signalizes"
];
pythonImportsCheck = [
"redis_lock"
];
meta = with lib; {
changelog = "https://github.com/ionelmc/python-redis-lock/blob/v${version}/CHANGELOG.rst";
description = "Lock context manager implemented via redis SETNX/BLPOP";
homepage = "https://github.com/ionelmc/python-redis-lock";
license = licenses.bsd2;
description = "Lock context manager implemented via redis SETNX/BLPOP";
maintainers = with maintainers; [ vanschelven ];
};
}