blob: 79b8ea68c563a3ecb83fe0b5b81e42f2037a8e5a (
plain)
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
42
43
44
|
# $NetBSD: extension.buildlink.mk,v 1.6 2002/01/15 17:21:25 drochner Exp $
# derive a python version from the package name if possible
.if defined(USE_PYPKGPREFIX) && defined(PKGNAME_REQD)
PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/^py([0-9]*)-.*/\1/}
.endif
.include "../../lang/python/pyversion.mk"
#
# below is what used to be in bsd.python.mk
#
.if defined(PYBINMODULE)
.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "vax"
IGNORE="${PKGNAME} needs dynamic loading"
.endif
.endif
.if exists(${PYTHONBIN})
PYINC!= ${PYTHONBIN} -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_inc(0, \"\")"
PYLIB!= ${PYTHONBIN} -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_lib(0, 1, \"\")"
PYSITELIB!= ${PYTHONBIN} -c "import distutils.sysconfig; \
print distutils.sysconfig.get_python_lib(0, 0, \"\")"
.endif
.if defined(PYDISTUTILSPKG)
PYSETUP?= setup.py
PYSETUPBUILDARGS?= #empty
PYSETUPINSTALLARGS?= #empty
PY_PATCHPLIST?= yes
do-build:
(cd ${WRKSRC} && ${PYTHONBIN} ${PYSETUP} ${PYSETUPBUILDARGS} build)
do-install:
(cd ${WRKSRC} && ${PYTHONBIN} ${PYSETUP} ${PYSETUPINSTALLARGS} install)
.endif
.if defined(PY_PATCHPLIST)
PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
.endif
|