14
0
Files
python-sqlglot/python-sqlglot.spec

62 lines
2.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-sqlglot
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-sqlglot
Version: 7.0.0
Release: 0
Summary: An easily customizable SQL parser and transpiler
License: MIT
URL: https://github.com/tobymao/sqlglot
Source: https://files.pythonhosted.org/packages/source/s/sqlglot/sqlglot-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildArch: noarch
%python_subpackages
%description
SQLGlot is a no dependency Python SQL parser, transpiler, and optimizer. It can be
used to format SQL or translate between different dialects like DuckDB, Presto,
Spark, Snowflake, and BigQuery. It aims to read a wide variety of SQL inputs and
output syntactically correct SQL in the targeted dialects.
It is a very comprehensive generic SQL parser with a robust test suite. It is also
quite performant while being written purely in Python. You can easily customize the
parser, analyze queries, traverse expression trees, and programmatically build SQL.
Syntax errors are highlighted and dialect incompatibilities can warn or raise
depending on configurations.
%prep
%setup -q -n sqlglot-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%doc README.md
%license LICENSE
%{python_sitelib}/sqlglot
%{python_sitelib}/sqlglot-%{version}*-info
%changelog