git: 757662b297a6 - main - databases/py-sqlglot: Add py-sqlglot 5.3.1

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 04 Sep 2022 03:52:13 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=757662b297a6a0e64b3d823e83484df6af8ffc13

commit 757662b297a6a0e64b3d823e83484df6af8ffc13
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-09-04 03:41:28 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-09-04 03:41:28 +0000

    databases/py-sqlglot: Add py-sqlglot 5.3.1
    
    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, 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.
    
    WWW: https://github.com/tobymao/sqlglot
---
 databases/Makefile             |  1 +
 databases/py-sqlglot/Makefile  | 18 ++++++++++++++++++
 databases/py-sqlglot/distinfo  |  3 +++
 databases/py-sqlglot/pkg-descr | 15 +++++++++++++++
 4 files changed, 37 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index c484f02fa6d0..949033aedadd 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -833,6 +833,7 @@
     SUBDIR += py-sqlalchemy12
     SUBDIR += py-sqlalchemy13
     SUBDIR += py-sqlalchemy14
+    SUBDIR += py-sqlglot
     SUBDIR += py-sqlite-fts4
     SUBDIR += py-sqlite-utils
     SUBDIR += py-sqlite3
diff --git a/databases/py-sqlglot/Makefile b/databases/py-sqlglot/Makefile
new file mode 100644
index 000000000000..76fdfe3e57bd
--- /dev/null
+++ b/databases/py-sqlglot/Makefile
@@ -0,0 +1,18 @@
+PORTNAME=	sqlglot
+PORTVERSION=	5.3.1
+CATEGORIES=	databases python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Easily customizable SQL parser and transpiler
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/databases/py-sqlglot/distinfo b/databases/py-sqlglot/distinfo
new file mode 100644
index 000000000000..e34306292a1a
--- /dev/null
+++ b/databases/py-sqlglot/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1662212102
+SHA256 (sqlglot-5.3.1.tar.gz) = 615d7bf589ed167972d98edc74657e2063254ebea0812eb6e06245dd928193fb
+SIZE (sqlglot-5.3.1.tar.gz) = 90651
diff --git a/databases/py-sqlglot/pkg-descr b/databases/py-sqlglot/pkg-descr
new file mode 100644
index 000000000000..3539cee7bb27
--- /dev/null
+++ b/databases/py-sqlglot/pkg-descr
@@ -0,0 +1,15 @@
+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, 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.
+
+WWW: https://github.com/tobymao/sqlglot