git: 3601989e86ec - main - databases/py-dbt-snowflake: new port

From: Kurt Jaeger <pi_at_FreeBSD.org>
Date: Sun, 22 Oct 2023 08:45:39 UTC
The branch main has been updated by pi:

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

commit 3601989e86ec783801f9ffca5b8374e1757f107b
Author:     Pat Maddox <pat@patmaddox.com>
AuthorDate: 2023-10-22 08:43:24 +0000
Commit:     Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2023-10-22 08:43:24 +0000

    databases/py-dbt-snowflake: new port
    
    The dbt-snowflake package contains all of the code enabling dbt to work with
    Snowflake.
    
    PR:             274583
    Author:    Pat Maddox <pat@patmaddox.com>
---
 databases/Makefile                   |  1 +
 databases/py-dbt-snowflake/Makefile  | 38 ++++++++++++++++++++++++++++++++++++
 databases/py-dbt-snowflake/distinfo  |  3 +++
 databases/py-dbt-snowflake/pkg-descr |  2 ++
 4 files changed, 44 insertions(+)

diff --git a/databases/Makefile b/databases/Makefile
index a9d000c30e9f..34b75fde9742 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -758,6 +758,7 @@
     SUBDIR += py-dbf
     SUBDIR += py-dbt-core
     SUBDIR += py-dbt-semantic-interfaces
+    SUBDIR += py-dbt-snowflake
     SUBDIR += py-dbutils
     SUBDIR += py-duckdb
     SUBDIR += py-fakeredis
diff --git a/databases/py-dbt-snowflake/Makefile b/databases/py-dbt-snowflake/Makefile
new file mode 100644
index 000000000000..d09504defe8c
--- /dev/null
+++ b/databases/py-dbt-snowflake/Makefile
@@ -0,0 +1,38 @@
+PORTNAME=	dbt-snowflake
+PORTVERSION=	1.6.0
+CATEGORIES=	databases python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	pat@patmaddox.com
+COMMENT=	Snowflake adapter plugin for dbt
+WWW=		https://github.com/dbt-labs/dbt-snowflake
+
+LICENSE=	APACHE20
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}agate>0:textproc/py-agate@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dbt-core>=1.6,<2:databases/py-dbt-core@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}snowflake-connector-python>=3.0,<4:databases/py-snowflake-connector-python@${PY_FLAVOR} \
+	        ${PYTHON_PKGNAMEPREFIX}keyring>0:security/py-keyring@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent distutils
+
+# py-dbt-snowflake attempts to install __init__.py and the generated bytecode into
+# these directories which conflicts with those installed by py-dbt-core. We need to
+# delete these files and their entries in the generated plist post-install.
+COMMON_DIRS=	dbt \
+		dbt/adapters \
+		dbt/include
+
+post-stage:
+.for dir in ${COMMON_DIRS:S|/|\/|g}
+	@${REINPLACE_CMD} -e '/.*\/${dir}\/__init__.py/d' \
+		-e '/.*\/${dir}\/__pycache__.*/d' \
+		${WRKDIR}/.PLIST.pymodtmp
+.endfor
+.for dir in ${COMMON_DIRS}
+	@(cd ${STAGEDIR}${PYTHON_SITELIBDIR}/${dir} && ${RM} -r __pycache__ __init__.py)
+.endfor
+
+.include <bsd.port.mk>
diff --git a/databases/py-dbt-snowflake/distinfo b/databases/py-dbt-snowflake/distinfo
new file mode 100644
index 000000000000..76bf8dc3209c
--- /dev/null
+++ b/databases/py-dbt-snowflake/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1691563233
+SHA256 (dbt-snowflake-1.6.0.tar.gz) = 1e710aeafceaa57318dce58789595c813cc1c551f43a0e1ec03d34c6659f504c
+SIZE (dbt-snowflake-1.6.0.tar.gz) = 31680
diff --git a/databases/py-dbt-snowflake/pkg-descr b/databases/py-dbt-snowflake/pkg-descr
new file mode 100644
index 000000000000..0c0b89753a9a
--- /dev/null
+++ b/databases/py-dbt-snowflake/pkg-descr
@@ -0,0 +1,2 @@
+The dbt-snowflake package contains all of the code enabling dbt to work with
+Snowflake.