nixpkgs/pkgs/development/python-modules/sqlglot/default.nix
Martin Weinelt 8056f9250c
treewide: remove redundant SETUPTOOLS_SCM_PRETEND_VERSION usage
The setuptools-scm packages gained a setup hook, that sets it to the
derivation version automatically, so setting it to that manually has
become redundant.

This also affects downstream consumers of setuptools-scm, like hatch-vcs
or flit-scm.
2023-12-20 20:16:39 +01:00

43 lines
1013 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytestCheckHook
, python-dateutil
, duckdb
, setuptools-scm
}:
buildPythonPackage rec {
pname = "sqlglot";
version = "17.14.2";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
repo = "sqlglot";
owner = "tobymao";
rev = "v${version}";
hash = "sha256-aImshQ5jf0k62ucpK4X8G7uHGAFQkhGgjMYo4mvSvew=";
};
nativeBuildInputs = [ setuptools-scm ];
# optional dependency used in the sqlglot optimizer
propagatedBuildInputs = [ python-dateutil ];
nativeCheckInputs = [ pytestCheckHook duckdb ];
# these integration tests assume a running Spark instance
disabledTestPaths = [ "tests/dataframe/integration" ];
pythonImportsCheck = [ "sqlglot" ];
meta = with lib; {
description = "A no dependency Python SQL parser, transpiler, and optimizer";
homepage = "https://github.com/tobymao/sqlglot";
license = licenses.mit;
maintainers = with maintainers; [ cpcloud ];
};
}