Unverified Commit 4a43c3a3 authored by Yt's avatar Yt Committed by GitHub
Browse files

python3Packages.djangorestframework-jsonp: init at 1.0.2 (#350423)

parents 45ad88db d56e52fd
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
{
  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 ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -3524,6 +3524,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 { };