ports/databases/py-dbt-snowflake/Makefile
Charlie Li 06a08e69f3
python: bump all USE_PYTHON=distutils consumers after RUN_DEPENDS removal
Any missed ports, feel free to bump.

Any ports that need setuptools at runtime can have the devel/py-setuptools
manually added back to RUN_DEPENDS, but understand that this practice
is deprecated; see CHANGES for details.
2025-03-07 23:05:21 -05:00

41 lines
1.3 KiB
Makefile

PORTNAME= dbt-snowflake
DISTVERSION= 1.7.3
PORTREVISION= 1
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.7.3<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>=16.1.1:security/py-keyring@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist concurrent distutils
NO_ARCH= yes
# 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>