2020-12-10 04:20:00 +00:00
|
|
|
{ lib
|
2018-10-27 22:45:54 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2020-12-10 04:20:00 +00:00
|
|
|
, installShellFiles
|
|
|
|
, pytestCheckHook
|
2018-10-27 22:45:54 +01:00
|
|
|
, isPy3k
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "sqlparse";
|
2020-11-29 14:04:43 +00:00
|
|
|
version = "0.4.1";
|
2018-10-27 22:45:54 +01:00
|
|
|
|
2020-12-10 04:20:00 +00:00
|
|
|
disabled = !isPy3k;
|
|
|
|
|
2018-10-27 22:45:54 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:43 +00:00
|
|
|
sha256 = "0f91fd2e829c44362cbcfab3e9ae12e22badaa8a29ad5ff599f9ec109f0454e8";
|
2018-10-27 22:45:54 +01:00
|
|
|
};
|
|
|
|
|
2020-12-10 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2018-10-27 22:45:54 +01:00
|
|
|
|
2020-12-10 04:20:00 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
2018-10-27 22:45:54 +01:00
|
|
|
|
2020-12-10 04:20:00 +00:00
|
|
|
postInstall = ''
|
|
|
|
installManPage docs/sqlformat.1
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-10-27 22:45:54 +01:00
|
|
|
description = "Non-validating SQL parser for Python";
|
|
|
|
longDescription = ''
|
|
|
|
Provides support for parsing, splitting and formatting SQL statements.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/andialbrecht/sqlparse";
|
2018-10-27 22:45:54 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|