python312Packages.django-redis: modernize
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
# testing
|
||||
pkgs,
|
||||
pytest-cov-stub,
|
||||
pytest-django,
|
||||
pytest-mock,
|
||||
pytestCheckHook,
|
||||
@@ -33,11 +34,7 @@ buildPythonPackage rec {
|
||||
hash = "sha256-m7z3c7My24vrSSnyfDQ/LlWhy7pV4U0L8LATMvkfczc=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -i '/-cov/d' setup.cfg
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
django
|
||||
@@ -52,9 +49,9 @@ buildPythonPackage rec {
|
||||
|
||||
pythonImportsCheck = [ "django_redis" ];
|
||||
|
||||
DJANGO_SETTINGS_MODULE = "tests.settings.sqlite";
|
||||
|
||||
preCheck = ''
|
||||
export DJANGO_SETTINGS_MODULE=tests.settings.sqlite
|
||||
|
||||
${pkgs.redis}/bin/redis-server &
|
||||
REDIS_PID=$!
|
||||
'';
|
||||
@@ -64,10 +61,11 @@ buildPythonPackage rec {
|
||||
'';
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest-cov-stub
|
||||
pytest-django
|
||||
pytest-mock
|
||||
pytestCheckHook
|
||||
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
||||
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
||||
|
||||
pytestFlagsArray = [
|
||||
"-W"
|
||||
|
||||
Reference in New Issue
Block a user