git: c3686ab14cfd - main - databases/py-sqloxide: Add py-sqloxide 0.1.48

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 30 Sep 2024 13:41:15 UTC
The branch main has been updated by sunpoet:

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

commit c3686ab14cfd4d0c77932313507f2748059d2eb1
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-09-30 12:43:24 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-30 13:36:21 +0000

    databases/py-sqloxide: Add py-sqloxide 0.1.48
    
    sqloxide wraps rust bindings for sqlparser-rs into a python package using pyO3.
    
    The original goal of this project was to have a very fast, efficient, and
    accurate SQL parser I could use for building data lineage graphs across large
    code bases (think hundreds of auto-generated .sql files). Most existing sql
    parsing approaches for python are either very slow or not accurate (especially
    in regards to deeply nested queries, sub-selects and/or table aliases). Looking
    to the rust community for support, I found the excellent sqlparser-rs crate
    which is quite easy to wrap in python code.
---
 databases/Makefile                               |  1 +
 databases/py-sqloxide/Makefile                   | 23 +++++++
 databases/py-sqloxide/Makefile.crates            | 41 ++++++++++++
 databases/py-sqloxide/distinfo                   | 85 ++++++++++++++++++++++++
 databases/py-sqloxide/files/patch-pyproject.toml | 11 +++
 databases/py-sqloxide/pkg-descr                  |  9 +++
 6 files changed, 170 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index 16dc8a70b6e7..471da2fdccf3 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -852,6 +852,7 @@
     SUBDIR += py-sqlite-utils
     SUBDIR += py-sqlite3
     SUBDIR += py-sqlobject
+    SUBDIR += py-sqloxide
     SUBDIR += py-sqlparse
     SUBDIR += py-sqlrelay
     SUBDIR += py-tableschema
diff --git a/databases/py-sqloxide/Makefile b/databases/py-sqloxide/Makefile
new file mode 100644
index 000000000000..a17f9ed63a44
--- /dev/null
+++ b/databases/py-sqloxide/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	sqloxide
+PORTVERSION=	0.1.48
+CATEGORIES=	databases python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+DISTFILES=	${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Python bindings for sqlparser-rs
+WWW=		https://github.com/wseaton/sqloxide
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}maturin>=0.13:devel/py-maturin@${PY_FLAVOR}
+
+USES=		cargo python
+USE_PYTHON=	autoplist concurrent pep517
+
+CARGO_BUILD=	no
+CARGO_INSTALL=	no
+
+.include <bsd.port.mk>
diff --git a/databases/py-sqloxide/Makefile.crates b/databases/py-sqloxide/Makefile.crates
new file mode 100644
index 000000000000..218f4383904a
--- /dev/null
+++ b/databases/py-sqloxide/Makefile.crates
@@ -0,0 +1,41 @@
+CARGO_CRATES=	autocfg-1.3.0 \
+		bitflags-2.6.0 \
+		cfg-if-1.0.0 \
+		heck-0.4.1 \
+		indoc-2.0.5 \
+		libc-0.2.158 \
+		lock_api-0.4.12 \
+		log-0.4.22 \
+		memoffset-0.9.1 \
+		once_cell-1.19.0 \
+		parking_lot-0.12.3 \
+		parking_lot_core-0.9.10 \
+		portable-atomic-1.7.0 \
+		proc-macro2-1.0.86 \
+		pyo3-0.21.2 \
+		pyo3-build-config-0.21.2 \
+		pyo3-ffi-0.21.2 \
+		pyo3-macros-0.21.2 \
+		pyo3-macros-backend-0.21.2 \
+		pythonize-0.21.1 \
+		quote-1.0.37 \
+		redox_syscall-0.5.4 \
+		scopeguard-1.2.0 \
+		serde-1.0.210 \
+		serde_derive-1.0.210 \
+		smallvec-1.13.2 \
+		sqlparser-0.47.0 \
+		sqlparser_derive-0.2.2 \
+		syn-2.0.77 \
+		target-lexicon-0.12.16 \
+		unicode-ident-1.0.13 \
+		unindent-0.2.3 \
+		windows-targets-0.52.6 \
+		windows_aarch64_gnullvm-0.52.6 \
+		windows_aarch64_msvc-0.52.6 \
+		windows_i686_gnu-0.52.6 \
+		windows_i686_gnullvm-0.52.6 \
+		windows_i686_msvc-0.52.6 \
+		windows_x86_64_gnu-0.52.6 \
+		windows_x86_64_gnullvm-0.52.6 \
+		windows_x86_64_msvc-0.52.6
diff --git a/databases/py-sqloxide/distinfo b/databases/py-sqloxide/distinfo
new file mode 100644
index 000000000000..eb79af9650a1
--- /dev/null
+++ b/databases/py-sqloxide/distinfo
@@ -0,0 +1,85 @@
+TIMESTAMP = 1727314488
+SHA256 (sqloxide-0.1.48.tar.gz) = d97529189c3a526a0c2f9d635ef80b0a2d526cca7c21a62bd66b21bdd0d37d75
+SIZE (sqloxide-0.1.48.tar.gz) = 13570
+SHA256 (rust/crates/autocfg-1.3.0.crate) = 0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0
+SIZE (rust/crates/autocfg-1.3.0.crate) = 16524
+SHA256 (rust/crates/bitflags-2.6.0.crate) = b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de
+SIZE (rust/crates/bitflags-2.6.0.crate) = 45357
+SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd
+SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934
+SHA256 (rust/crates/heck-0.4.1.crate) = 95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8
+SIZE (rust/crates/heck-0.4.1.crate) = 11567
+SHA256 (rust/crates/indoc-2.0.5.crate) = b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5
+SIZE (rust/crates/indoc-2.0.5.crate) = 14396
+SHA256 (rust/crates/libc-0.2.158.crate) = d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439
+SIZE (rust/crates/libc-0.2.158.crate) = 751340
+SHA256 (rust/crates/lock_api-0.4.12.crate) = 07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17
+SIZE (rust/crates/lock_api-0.4.12.crate) = 27591
+SHA256 (rust/crates/log-0.4.22.crate) = a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24
+SIZE (rust/crates/log-0.4.22.crate) = 44027
+SHA256 (rust/crates/memoffset-0.9.1.crate) = 488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a
+SIZE (rust/crates/memoffset-0.9.1.crate) = 9032
+SHA256 (rust/crates/once_cell-1.19.0.crate) = 3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92
+SIZE (rust/crates/once_cell-1.19.0.crate) = 33046
+SHA256 (rust/crates/parking_lot-0.12.3.crate) = f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27
+SIZE (rust/crates/parking_lot-0.12.3.crate) = 41860
+SHA256 (rust/crates/parking_lot_core-0.9.10.crate) = 1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8
+SIZE (rust/crates/parking_lot_core-0.9.10.crate) = 32406
+SHA256 (rust/crates/portable-atomic-1.7.0.crate) = da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265
+SIZE (rust/crates/portable-atomic-1.7.0.crate) = 145385
+SHA256 (rust/crates/proc-macro2-1.0.86.crate) = 5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77
+SIZE (rust/crates/proc-macro2-1.0.86.crate) = 48958
+SHA256 (rust/crates/pyo3-0.21.2.crate) = a5e00b96a521718e08e03b1a622f01c8a8deb50719335de3f60b3b3950f069d8
+SIZE (rust/crates/pyo3-0.21.2.crate) = 504574
+SHA256 (rust/crates/pyo3-build-config-0.21.2.crate) = 7883df5835fafdad87c0d888b266c8ec0f4c9ca48a5bed6bbb592e8dedee1b50
+SIZE (rust/crates/pyo3-build-config-0.21.2.crate) = 30581
+SHA256 (rust/crates/pyo3-ffi-0.21.2.crate) = 01be5843dc60b916ab4dad1dca6d20b9b4e6ddc8e15f50c47fe6d85f1fb97403
+SIZE (rust/crates/pyo3-ffi-0.21.2.crate) = 66160
+SHA256 (rust/crates/pyo3-macros-0.21.2.crate) = 77b34069fc0682e11b31dbd10321cbf94808394c56fd996796ce45217dfac53c
+SIZE (rust/crates/pyo3-macros-0.21.2.crate) = 7920
+SHA256 (rust/crates/pyo3-macros-backend-0.21.2.crate) = 08260721f32db5e1a5beae69a55553f56b99bd0e1c3e6e0a5e8851a9d0f5a85c
+SIZE (rust/crates/pyo3-macros-backend-0.21.2.crate) = 58088
+SHA256 (rust/crates/pythonize-0.21.1.crate) = 9d0664248812c38cc55a4ed07f88e4df516ce82604b93b1ffdc041aa77a6cb3c
+SIZE (rust/crates/pythonize-0.21.1.crate) = 13357
+SHA256 (rust/crates/quote-1.0.37.crate) = b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af
+SIZE (rust/crates/quote-1.0.37.crate) = 28558
+SHA256 (rust/crates/redox_syscall-0.5.4.crate) = 0884ad60e090bf1345b93da0a5de8923c93884cd03f40dfcfddd3b4bee661853
+SIZE (rust/crates/redox_syscall-0.5.4.crate) = 25977
+SHA256 (rust/crates/scopeguard-1.2.0.crate) = 94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49
+SIZE (rust/crates/scopeguard-1.2.0.crate) = 11619
+SHA256 (rust/crates/serde-1.0.210.crate) = c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a
+SIZE (rust/crates/serde-1.0.210.crate) = 78338
+SHA256 (rust/crates/serde_derive-1.0.210.crate) = 243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f
+SIZE (rust/crates/serde_derive-1.0.210.crate) = 56020
+SHA256 (rust/crates/smallvec-1.13.2.crate) = 3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67
+SIZE (rust/crates/smallvec-1.13.2.crate) = 35216
+SHA256 (rust/crates/sqlparser-0.47.0.crate) = 295e9930cd7a97e58ca2a070541a3ca502b17f5d1fa7157376d0fabd85324f25
+SIZE (rust/crates/sqlparser-0.47.0.crate) = 201617
+SHA256 (rust/crates/sqlparser_derive-0.2.2.crate) = 01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554
+SIZE (rust/crates/sqlparser_derive-0.2.2.crate) = 3901
+SHA256 (rust/crates/syn-2.0.77.crate) = 9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed
+SIZE (rust/crates/syn-2.0.77.crate) = 268784
+SHA256 (rust/crates/target-lexicon-0.12.16.crate) = 61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1
+SIZE (rust/crates/target-lexicon-0.12.16.crate) = 26488
+SHA256 (rust/crates/unicode-ident-1.0.13.crate) = e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe
+SIZE (rust/crates/unicode-ident-1.0.13.crate) = 43279
+SHA256 (rust/crates/unindent-0.2.3.crate) = c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce
+SIZE (rust/crates/unindent-0.2.3.crate) = 7306
+SHA256 (rust/crates/windows-targets-0.52.6.crate) = 9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973
+SIZE (rust/crates/windows-targets-0.52.6.crate) = 6403
+SHA256 (rust/crates/windows_aarch64_gnullvm-0.52.6.crate) = 32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3
+SIZE (rust/crates/windows_aarch64_gnullvm-0.52.6.crate) = 435718
+SHA256 (rust/crates/windows_aarch64_msvc-0.52.6.crate) = 09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469
+SIZE (rust/crates/windows_aarch64_msvc-0.52.6.crate) = 832615
+SHA256 (rust/crates/windows_i686_gnu-0.52.6.crate) = 8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b
+SIZE (rust/crates/windows_i686_gnu-0.52.6.crate) = 880402
+SHA256 (rust/crates/windows_i686_gnullvm-0.52.6.crate) = 0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66
+SIZE (rust/crates/windows_i686_gnullvm-0.52.6.crate) = 475940
+SHA256 (rust/crates/windows_i686_msvc-0.52.6.crate) = 240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66
+SIZE (rust/crates/windows_i686_msvc-0.52.6.crate) = 901163
+SHA256 (rust/crates/windows_x86_64_gnu-0.52.6.crate) = 147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78
+SIZE (rust/crates/windows_x86_64_gnu-0.52.6.crate) = 836363
+SHA256 (rust/crates/windows_x86_64_gnullvm-0.52.6.crate) = 24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d
+SIZE (rust/crates/windows_x86_64_gnullvm-0.52.6.crate) = 435707
+SHA256 (rust/crates/windows_x86_64_msvc-0.52.6.crate) = 589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec
+SIZE (rust/crates/windows_x86_64_msvc-0.52.6.crate) = 832564
diff --git a/databases/py-sqloxide/files/patch-pyproject.toml b/databases/py-sqloxide/files/patch-pyproject.toml
new file mode 100644
index 000000000000..503c44f6d631
--- /dev/null
+++ b/databases/py-sqloxide/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+--- pyproject.toml.orig	2024-09-13 16:10:59 UTC
++++ pyproject.toml
+@@ -13,7 +13,7 @@ classifiers = [
+ ]
+ 
+ [build-system]
+-requires = ["maturin>=0.13,<0.14"]
++requires = ["maturin>=0.13"]
+ build-backend = "maturin"
+ 
+ [project]
diff --git a/databases/py-sqloxide/pkg-descr b/databases/py-sqloxide/pkg-descr
new file mode 100644
index 000000000000..81a2608d2e2d
--- /dev/null
+++ b/databases/py-sqloxide/pkg-descr
@@ -0,0 +1,9 @@
+sqloxide wraps rust bindings for sqlparser-rs into a python package using pyO3.
+
+The original goal of this project was to have a very fast, efficient, and
+accurate SQL parser I could use for building data lineage graphs across large
+code bases (think hundreds of auto-generated .sql files). Most existing sql
+parsing approaches for python are either very slow or not accurate (especially
+in regards to deeply nested queries, sub-selects and/or table aliases). Looking
+to the rust community for support, I found the excellent sqlparser-rs crate
+which is quite easy to wrap in python code.