summaryrefslogtreecommitdiff
path: root/lang/python/srcdist.mk
blob: 84166d64f1534197a1d2ebe8458d302ead876e49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# $NetBSD: srcdist.mk,v 1.36 2017/01/01 14:34:26 adam Exp $

.include "../../lang/python/pyversion.mk"

.sinclude "${.CURDIR}/${PYPKGSRCDIR}/dist.mk"

PYSUBDIR=	${DISTNAME}
WRKSRC=		${WRKDIR}/${PYSUBDIR}

.if defined(PYDISTUTILSPKG)
# This is used for standard modules shipped with Python but build as
# separate packages.

.  if ${PYVERSSUFFIX} == "3.5" || ${PYVERSSUFFIX} == "3.6"
EXTRACT_ELEMENTS+=	${PYSUBDIR}/Modules/clinic
.  endif

python-std-patchsetup:
	${SED} ${PY_SETUP_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/} \
		<${FILESDIR}/setup.py >${WRKSRC}/setup.py

post-extract: python-std-patchsetup
.endif