Unverified Commit d0ca2f5f authored by Fabian Affolter's avatar Fabian Affolter Committed by Martin Weinelt
Browse files

python312Packages.sqlparse: refactor

parent 9c2d2665
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchPypi
, flit-core
, hatchling
, installShellFiles
, pytestCheckHook
, isPy3k
, pythonOlder

# for passthru.tests
, django
@@ -16,17 +16,18 @@
buildPythonPackage rec {
  pname = "sqlparse";
  version = "0.5.0";
  pyproject = true;

  disabled = !isPy3k;
  disabled = pythonOlder "3.8";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-cU0KSTLAWdFhifWO9UEewih6Q2DxfN0O3S0J1MUIfJM=";
  };

  format = "pyproject";
  build-system = [ hatchling ];

  nativeBuildInputs = [ flit-core installShellFiles ];
  nativeBuildInputs = [ installShellFiles ];

  nativeCheckInputs = [ pytestCheckHook ];

@@ -40,11 +41,12 @@ buildPythonPackage rec {

  meta = with lib; {
    description = "Non-validating SQL parser for Python";
    mainProgram = "sqlformat";
    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";
  };
}