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,
|
lib,
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
django,
|
|
||||||
django-guardian,
|
django-guardian,
|
||||||
djangorestframework,
|
djangorestframework,
|
||||||
|
pytest-django,
|
||||||
|
pytestCheckHook,
|
||||||
|
setuptools,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "djangorestframework-guardian";
|
pname = "djangorestframework-guardian";
|
||||||
version = "0.3.0";
|
version = "0.4.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "rpkilby";
|
owner = "rpkilby";
|
||||||
repo = "django-rest-framework-guardian";
|
repo = "django-rest-framework-guardian";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-jl/VEl1pUHU8J1d5ZQSGJweNJayIGw1iVAmwID85fqw=";
|
hash = "sha256-7SaKyWoLen5DAwSyrWeA4rEmjXMcPwJ7LM7WYxk+IKs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
build-system = [ setuptools ];
|
||||||
chmod +x manage.py
|
|
||||||
patchShebangs manage.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [
|
||||||
django-guardian
|
django-guardian
|
||||||
djangorestframework
|
djangorestframework
|
||||||
];
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
nativeCheckInputs = [
|
||||||
./manage.py test
|
pytest-django
|
||||||
'';
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
|
env.DJANGO_SETTINGS_MODULE = "tests.settings";
|
||||||
|
|
||||||
pythonImportsCheck = [ "rest_framework_guardian" ];
|
pythonImportsCheck = [ "rest_framework_guardian" ];
|
||||||
|
|
||||||
@@ -40,7 +42,5 @@ buildPythonPackage rec {
|
|||||||
homepage = "https://github.com/rpkilby/django-rest-framework-guardian";
|
homepage = "https://github.com/rpkilby/django-rest-framework-guardian";
|
||||||
license = licenses.bsd3;
|
license = licenses.bsd3;
|
||||||
maintainers = [ ];
|
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