python3Packages.djangorestframework-guardian: 0.3.0 -> 0.4.0, switch to pyproject and run tests with pytest
This commit is contained in:
@@ -2,36 +2,38 @@
|
||||
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" ];
|
||||
|
||||
@@ -40,7 +42,5 @@ buildPythonPackage rec {
|
||||
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";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user