summary refs log tree commit diff
path: root/pkgs/development/python-modules/sqlparse/default.nix
blob: 193fa3439b5639d4b58dd91dc8bbafff43ea8375 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{ lib
, buildPythonPackage
, fetchPypi
, flit-core
, installShellFiles
, pytestCheckHook
, isPy3k
}:

buildPythonPackage rec {
  pname = "sqlparse";
  version = "0.4.4";

  disabled = !isPy3k;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-1EYYPoS4NJ+jBh8P5/BsqUumW0JpRv/r5uPoKVMyQgw=";
  };

  format = "pyproject";

  nativeBuildInputs = [ flit-core installShellFiles ];

  nativeCheckInputs = [ pytestCheckHook ];

  postInstall = ''
    installManPage docs/sqlformat.1
  '';

  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";
    license = licenses.bsd3;
  };
}