summaryrefslogtreecommitdiff
path: root/Mk/Uses/azurepy.mk
blob: 26a4f123773d48455fc54a027a5338f78249bfda (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
37
38
39
40
41
# $FreeBSD$
#
# Shared namespace for py-azure-* ports
# Feature:	azurepy
# Usage:	USES=	azurepy
# MAINTAINER:	dbaio@FreeBSD.org

.if !defined(_INCLUDE_USES_AZUREPY_MK)
_INCLUDE_USES_AZUREPY_MK=	yes

RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}azure-cli-base>=0:sysutils/py-azure-cli-base@${PY_FLAVOR}

POST_PLIST=	trim-azure-namespace

_USES_install+=	701:remove-common-files
remove-common-files:
	@${RM} ${STAGEDIR}${PYTHON_SITELIBDIR}/azure/__init__.py* \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/cli/__init__.py* \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/cli/command_modules/__init__.py* \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/mgmt/__init__.py* \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/mgmt/datalake/__init__.py*
	@${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/azure/__pycache__ \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/cli/__pycache__ \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/cli/command_modules/__pycache__ \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/mgmt/__pycache__ \
		${STAGEDIR}${PYTHON_SITELIBDIR}/azure/mgmt/datalake/__pycache__

trim-azure-namespace:
	@${REINPLACE_CMD} -e '/azure\/__init__.py*/d' \
		-e '/azure\/cli\/__init__.py*/d' \
		-e '/azure\/cli\/command_modules\/__init__.py*/d' \
		-e '/azure\/mgmt\/__init__.py*/d' \
		-e '/azure\/mgmt\/datalake\/__init__.py*/d' \
		-e '/azure\/__pycache__*/d' \
		-e '/azure\/cli\/__pycache__*/d' \
		-e '/azure\/cli\/command_modules\/__pycache__*/d' \
		-e '/azure\/mgmt\/__pycache__*/d' \
		-e '/azure\/mgmt\/datalake\/__pycache__*/d' \
		${TMPPLIST}

.endif