From 4ff1ad170fbbde7a3a6e735ad79cfc93066419ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 12 Jun 2022 05:16:26 +0000 Subject: [PATCH] python310Packages.django-jinja: run tests --- .../python-modules/django-jinja2/default.nix | 51 ++++++++++++------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/django-jinja2/default.nix b/pkgs/development/python-modules/django-jinja2/default.nix index 305e153ce602..8216ca4ff872 100644 --- a/pkgs/development/python-modules/django-jinja2/default.nix +++ b/pkgs/development/python-modules/django-jinja2/default.nix @@ -1,28 +1,45 @@ -{ lib, buildPythonPackage, fetchPypi, - django, jinja2, pytz, tox - }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, django +, jinja2 +, python +}: buildPythonPackage rec { pname = "django-jinja"; version = "2.10.2"; + disabled = pythonOlder "3.6"; + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "niwinz"; + repo = "django-jinja"; + rev = version; + hash = "sha256-IZ4HjBQt6K8xbaYfO5DVlGKUVCQ3UciAUpfnqCjzyCE="; + }; + + propagatedBuildInputs = [ + django + jinja2 + ]; + + checkPhase = '' + runHook preCheck + + ${python.interpreter} testing/runtests.py + + runHook postCheck + ''; + meta = { description = "Simple and nonobstructive jinja2 integration with Django"; homepage = "https://github.com/niwinz/django-jinja"; + changelog = "https://github.com/niwinz/django-jinja/blob/${src.rev}/CHANGES.adoc"; license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ dotlambda ]; }; - - src = fetchPypi { - inherit pname version; - sha256 = "sha256-v9+7VcH1pnnWmtV11VDEcH04ZjQAkVLv4BQInzxNFBI="; - }; - - buildInputs = [ django pytz tox ]; - propagatedBuildInputs = [ django jinja2 ]; - - # python installed: The directory '/homeless-shelter/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.,appdirs==1.4.3,Django==1.11.1,django-jinja==2.2.2,Jinja2==2.9.6,MarkupSafe==1.0,packaging==16.8,pyparsing==2.2.0,pytz==2017.2,six==1.10.0 - doCheck = false; - checkPhase = '' - tox - ''; }