Unverified Commit a3c502b6 authored by soyouzpanda's avatar soyouzpanda Committed by Defelo
Browse files

python3Packages.django-sql-utils: init at 0.7.0



Co-authored-by: default avatarDefelo <mail@defelo.de>
parent 2fb74473
Loading
Loading
Loading
Loading
+53 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  django,
  sqlparse,
  pytestCheckHook,
  pytest-django,
}:

buildPythonPackage rec {
  pname = "django-sql-utils";
  version = "0.7.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "martsberger";
    repo = "django-sql-utils";
    tag = version;
    hash = "sha256-OjKPxoWYheu8UQ14KvyiQyHISAQjJep+N4HRc4Msa1w=";
  };

  postPatch = ''
    echo -e "\n[tool.hatch.build.targets.wheel]\npackages = [ \"sql_util\" ]" >> pyproject.toml
  '';

  build-system = [ hatchling ];

  dependencies = [
    django
    sqlparse
  ];

  env = {
    DJANGO_SETTINGS_MODULE = "sql_util.tests.test_sqlite_settings";
  };

  nativeCheckInputs = [
    pytestCheckHook
    pytest-django
  ];

  pythonImportsCheck = [ "sql_util" ];

  meta = {
    description = "SQL utilities for Django";
    homepage = "https://github.com/martsberger/django-sql-utils";
    changelog = "https://github.com/martsberger/django-sql-utils/releases/tag/${version}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ defelo ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -3726,6 +3726,8 @@ self: super: with self; {
  django-soft-delete = callPackage ../development/python-modules/django-soft-delete { };
  django-sql-utils = callPackage ../development/python-modules/django-sql-utils { };
  django-statici18n = callPackage ../development/python-modules/django-statici18n { };
  django-storages = callPackage ../development/python-modules/django-storages { };