Unverified Commit 524c88a1 authored by Martin Weinelt's avatar Martin Weinelt
Browse files

python3Packages.django-modelsearch: 1.1.1 -> 1.2.0

https://github.com/wagtail/django-modelsearch/releases/tag/v1.2.0

Move to finalAttrs, enable the test suite.
parent b8fe735c
Loading
Loading
Loading
Loading
+24 −12
Original line number Diff line number Diff line
@@ -11,21 +11,24 @@
  django-tasks,

  # tests
  pytest-django,
  pytestCheckHook,
  django-modelcluster,
  django-taggit,
  dj-database-url,
  psycopg,
  pytestCheckHook,
  pytest-django,
}:

buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "modelsearch";
  version = "1.1.1";
  version = "1.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "wagtail";
    repo = "django-modelsearch";
    tag = "v${version}";
    hash = "sha256-tjwVepI9mdrMbTtxfe6yNUrSHWKndGxv2lJ8AfyNcr0=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-zmurjjiJO6A/9XuGsGQcBWRX4NW9xVCFkCVRUk0Ziro=";
  };

  build-system = [
@@ -34,21 +37,30 @@ buildPythonPackage rec {

  dependencies = [
    django
    django-modelcluster
    django-tasks
  ];

  pythonImportsCheck = [ "modelsearch" ];

  # django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured.
  # You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
  doCheck = false;
  nativeCheckInputs = [
    dj-database-url
    psycopg
    django-modelcluster
    django-taggit
    pytest-django
    pytestCheckHook
  ];

  preCheck = ''
    export DJANGO_SETTINGS_MODULE=modelsearch.test.settings
    export SEARCH_BACKEND=db
  '';

  meta = {
    description = "Index Django Models with Elasticsearch or OpenSearch and query them with the ORM";
    homepage = "https://github.com/wagtail/django-modelsearch";
    changelog = "https://github.com/wagtail/django-modelsearch/releases/tag/${src.tag}";
    changelog = "https://github.com/wagtail/django-modelsearch/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.bsd3;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
}
})