From 808299482a9343767944b5e7504d1099e1553031 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 13 Oct 2021 21:52:23 +0200 Subject: python3Packages.django-haystack: cleanup, enable tests --- .../python-modules/django-haystack/default.nix | 52 +++++++++++++++++----- 1 file changed, 41 insertions(+), 11 deletions(-) (limited to 'pkgs/development/python-modules') diff --git a/pkgs/development/python-modules/django-haystack/default.nix b/pkgs/development/python-modules/django-haystack/default.nix index c207a37ebf156..0f0f4a0a11743 100644 --- a/pkgs/development/python-modules/django-haystack/default.nix +++ b/pkgs/development/python-modules/django-haystack/default.nix @@ -1,30 +1,60 @@ -{ lib, buildPythonPackage, fetchPypi -, setuptools, setuptools-scm, django, python-dateutil, whoosh, pysolr -, coverage, mock, nose, geopy, requests }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi + +# build dependencies +, setuptools-scm + +# dependencies +, django + +# tests +, geopy +, nose +, pysolr +, python-dateutil +, requests +, whoosh +}: buildPythonPackage rec { pname = "django-haystack"; version = "3.1.1"; + format = "setuptools"; + disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; sha256 = "6d05756b95d7d5ec1dbd4668eb999ced1504b47f588e2e54be53b1404c516a82"; }; - checkInputs = [ pysolr whoosh python-dateutil geopy coverage nose mock coverage requests ]; - propagatedBuildInputs = [ django setuptools ]; - nativeBuildInputs = [ setuptools-scm ]; - postPatch = '' - sed -i 's/geopy==/geopy>=/' setup.py + substituteInPlace setup.py \ + --replace "geopy==" "geopy>=" ''; - # ImportError: cannot import name django.contrib.gis.geos.prototypes - doCheck = false; + nativeBuildInputs = [ + setuptools-scm + ]; + + propagatedBuildInputs = [ + django + ]; + + checkInputs = [ + geopy + nose + pysolr + python-dateutil + requests + whoosh + ]; meta = with lib; { - description = "Modular search for Django"; + description = "Pluggable search for Django"; homepage = "http://haystacksearch.org/"; license = licenses.bsd3; + maintainers = with maintainers; [ ]; }; } -- cgit 1.4.1