Skip to content

Commit

Permalink
databases/py-dbt-snowflake: new port
Browse files Browse the repository at this point in the history
The dbt-snowflake package contains all of the code enabling dbt to work with
Snowflake.

PR:		274583
Author:    Pat Maddox <pat@patmaddox.com>
  • Loading branch information
patmaddox authored and opsec committed Oct 22, 2023
1 parent da38902 commit 3601989
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions databases/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions databases/py-dbt-snowflake/Makefile
Original file line number Diff line number Diff line change
@@ -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>
3 changes: 3 additions & 0 deletions databases/py-dbt-snowflake/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1691563233
SHA256 (dbt-snowflake-1.6.0.tar.gz) = 1e710aeafceaa57318dce58789595c813cc1c551f43a0e1ec03d34c6659f504c
SIZE (dbt-snowflake-1.6.0.tar.gz) = 31680
2 changes: 2 additions & 0 deletions databases/py-dbt-snowflake/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The dbt-snowflake package contains all of the code enabling dbt to work with
Snowflake.

0 comments on commit 3601989

Please sign in to comment.