aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-09-04 03:41:28 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-09-04 03:41:28 +0000
commit757662b297a6a0e64b3d823e83484df6af8ffc13 (patch)
treee9af4c236deffbd1a33621c8caaffe79fe20e405
parenta6bf1fb90351bc87394aad4a719078119f6c7b4c (diff)
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
-rw-r--r--databases/Makefile1
-rw-r--r--databases/py-sqlglot/Makefile18
-rw-r--r--databases/py-sqlglot/distinfo3
-rw-r--r--databases/py-sqlglot/pkg-descr15
4 files changed, 37 insertions, 0 deletions
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