f2eae255dc
Note that this cannot be changed to ${INSTALL} because it is not the install command but rather an argument to setup.py. While adding the quotes makes no difference to the use of the file, it does keep pkglint quiet. This is even more important because this file is included by many other packages and causes warnings when trying to check new Python extensions.
37 lines
1 KiB
Makefile
37 lines
1 KiB
Makefile
# $NetBSD: extension.mk,v 1.11 2004/06/12 21:18:31 darcy Exp $
|
|
|
|
# derive a python version from the package name if possible
|
|
# optionally handled quoted package names
|
|
.if defined(PKGNAME_REQD)
|
|
PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/^[^-]*py([^-]*)-.*/\1/}
|
|
.endif
|
|
|
|
.include "../../lang/python/pyversion.mk"
|
|
|
|
.if defined(PYBINMODULE)
|
|
.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "vax"
|
|
PKG_FAIL_REASON= "${PKGNAME} needs dynamic loading"
|
|
.endif
|
|
.endif
|
|
|
|
.if defined(PYDISTUTILSPKG)
|
|
PYSETUP?= setup.py
|
|
PYSETUPBUILDARGS?= #empty
|
|
PYSETUPINSTALLARGS?= #empty
|
|
PYSETUPOPTARGS?= -c -O1
|
|
_PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS}
|
|
PY_PATCHPLIST?= yes
|
|
PYSETUPSUBDIR?= #empty
|
|
|
|
do-build:
|
|
(cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${MAKE_ENV} ${PYTHONBIN} \
|
|
${PYSETUP} build ${PYSETUPBUILDARGS})
|
|
|
|
do-install:
|
|
(cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${MAKE_ENV} ${PYTHONBIN} \
|
|
${PYSETUP} "install" ${_PYSETUPINSTALLARGS})
|
|
.endif
|
|
|
|
.if defined(PY_PATCHPLIST)
|
|
PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
|
|
.endif
|