Skip to content

Commit

Permalink
python3Packages.djangorestframework-jsonp: init at 1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
onny committed Oct 22, 2024
1 parent 80da651 commit 832e428
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
django,
python,
pytest-django,
pytestCheckHook,
djangorestframework,
}:

buildPythonPackage rec {
pname = "djangorestframework-jsonp";
version = "1.0.2";
format = "setuptools";

src = fetchFromGitHub {
owner = "jpadilla";
repo = "django-rest-framework-jsonp";
rev = "refs/tags/${version}";
hash = "sha256-4mIO69GhtvbQBtztHVQYIDDDSZpKg0g7BFNHEupiYTs=";
};

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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down

0 comments on commit 832e428

Please sign in to comment.