From e4f2f91888056cd573f4e40e0f681a9a0782c2c0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 2 Dec 2021 16:24:26 +0100 Subject: [PATCH] python3Packages.django-formtools: fix build --- .../django-formtools/default.nix | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/django-formtools/default.nix b/pkgs/development/python-modules/django-formtools/default.nix index b8db4ccfd404..c85d5d3fcc75 100644 --- a/pkgs/development/python-modules/django-formtools/default.nix +++ b/pkgs/development/python-modules/django-formtools/default.nix @@ -1,19 +1,40 @@ -{ lib, buildPythonPackage, fetchPypi, django, python }: +{ lib +, buildPythonPackage +, django +, fetchPypi +, python +, pythonOlder +, setuptools-scm +}: buildPythonPackage rec { pname = "django-formtools"; version = "2.3"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; sha256 = "9663b6eca64777b68d6d4142efad8597fe9a685924673b25aa8a1dcff4db00c3"; }; - propagatedBuildInputs = [ django ]; + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + django + ]; + checkPhase = '' ${python.interpreter} -m django test --settings=tests.settings ''; + pythonImportsCheck = [ + "formtools" + ]; + meta = with lib; { description = "A set of high-level abstractions for Django forms"; homepage = "https://github.com/jazzband/django-formtools";