python3Packages.djangorestframework-guardian: 0.3.0 -> 0.4.0, switch to pyproject and run tests with pytest

Changed files
+14 -14
pkgs
development
python-modules
djangorestframework-guardian
+14 -14
pkgs/development/python-modules/djangorestframework-guardian/default.nix
···
lib,
buildPythonPackage,
fetchFromGitHub,
-
django,
django-guardian,
djangorestframework,
+
pytest-django,
+
pytestCheckHook,
+
setuptools,
}:
buildPythonPackage rec {
pname = "djangorestframework-guardian";
-
version = "0.3.0";
-
format = "setuptools";
+
version = "0.4.0";
+
pyproject = true;
src = fetchFromGitHub {
owner = "rpkilby";
repo = "django-rest-framework-guardian";
rev = version;
-
hash = "sha256-jl/VEl1pUHU8J1d5ZQSGJweNJayIGw1iVAmwID85fqw=";
+
hash = "sha256-7SaKyWoLen5DAwSyrWeA4rEmjXMcPwJ7LM7WYxk+IKs=";
};
-
postPatch = ''
-
chmod +x manage.py
-
patchShebangs manage.py
-
'';
+
build-system = [ setuptools ];
-
propagatedBuildInputs = [
+
dependencies = [
django-guardian
djangorestframework
];
-
checkPhase = ''
-
./manage.py test
-
'';
+
nativeCheckInputs = [
+
pytest-django
+
pytestCheckHook
+
];
+
+
env.DJANGO_SETTINGS_MODULE = "tests.settings";
pythonImportsCheck = [ "rest_framework_guardian" ];
···
homepage = "https://github.com/rpkilby/django-rest-framework-guardian";
license = licenses.bsd3;
maintainers = [ ];
-
# unmaintained, last compatible version is 3.x, use djangorestframework-guardian2 instead
-
broken = lib.versionAtLeast django.version "4";
};
}