python3Packages.djangorestframework-jsonp: init at 1.0.2

This commit is contained in:
Jonas Heinrich 2024-10-20 09:30:44 +00:00
parent 80da651aa1
commit d56e52fd46
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,56 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
python,
pytest-django,
pytestCheckHook,
djangorestframework,
setuptools,
}:
buildPythonPackage rec {
pname = "djangorestframework-jsonp";
version = "1.0.2";
pyproject = true;
src = fetchFromGitHub {
owner = "jpadilla";
repo = "django-rest-framework-jsonp";
rev = "refs/tags/${version}";
hash = "sha256-4mIO69GhtvbQBtztHVQYIDDDSZpKg0g7BFNHEupiYTs=";
};
build-system = [ setuptools ];
dependencies = [
django
djangorestframework
];
checkInputs = [
pytestCheckHook
pytest-django
];
# Test fail with Django >=4
# https://github.com/jpadilla/django-rest-framework-jsonp/issues/14
doCheck = false;
checkPhase = ''
runHook preCheck
rm tests/test_renderers.py
${python.interpreter} runtests.py
runHook postCheck
'';
pythonImportsCheck = [ "rest_framework_jsonp" ];
meta = {
description = "JSONP support for Django REST Framework";
homepage = "https://jpadilla.github.io/django-rest-framework-jsonp/";
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.onny ];
};
}

View File

@ -3522,6 +3522,8 @@ self: super: with self; {
djangorestframework-guardian2 = callPackage ../development/python-modules/djangorestframework-guardian2 { };
djangorestframework-jsonp = callPackage ../development/python-modules/djangorestframework-jsonp { };
djangorestframework-recursive = callPackage ../development/python-modules/djangorestframework-recursive { };
djangorestframework-simplejwt = callPackage ../development/python-modules/djangorestframework-simplejwt { };