depot/third_party/nixpkgs/pkgs/development/python-modules/sqlparse/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

52 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, hatchling
, installShellFiles
, pytestCheckHook
, pythonOlder
# for passthru.tests
, django
, django_4
, django-silk
, pgadmin4
}:
buildPythonPackage rec {
pname = "sqlparse";
version = "0.5.0";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-cU0KSTLAWdFhifWO9UEewih6Q2DxfN0O3S0J1MUIfJM=";
};
build-system = [ hatchling ];
nativeBuildInputs = [ installShellFiles ];
nativeCheckInputs = [ pytestCheckHook ];
postInstall = ''
installManPage docs/sqlformat.1
'';
passthru.tests = {
inherit django django_4 django-silk pgadmin4;
};
meta = with lib; {
description = "Non-validating SQL parser for Python";
longDescription = ''
Provides support for parsing, splitting and formatting SQL statements.
'';
homepage = "https://github.com/andialbrecht/sqlparse";
changelog = "https://github.com/andialbrecht/sqlparse/blob/${version}/CHANGELOG";
license = licenses.bsd3;
mainProgram = "sqlformat";
};
}