aboutsummaryrefslogtreecommitdiff
path: root/databases/py-dbt-duckdb/Makefile
blob: 17dc4ccf12fcf4cc64cc357e17aaea155ef06df6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PORTNAME=	dbt-duckdb
PORTVERSION=	1.7.0
CATEGORIES=	databases python
MASTER_SITES=	PYPI
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	pat@patmaddox.com
COMMENT=	DuckDB adapter plugin for dbt (data build tool)
WWW=		https://github.com/jwills/dbt-duckdb

LICENSE=	APACHE20

RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dbt-core>=1.7.0,<2:databases/py-dbt-core@${PY_FLAVOR} \
		${PYTHON_PKGNAMEPREFIX}duckdb>=0.7.0:databases/py-duckdb@${PY_FLAVOR}

USES=		python
USE_PYTHON=	autoplist concurrent distutils

# py-dbt-duckdb 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>