Annotation of pkgsrc/lang/python/extension.mk, revision 1.18
1.18 ! tnn 1: # $NetBSD: extension.mk,v 1.17 2007/10/31 00:59:52 joerg Exp $
1.1 jlam 2:
3: # derive a python version from the package name if possible
1.7 recht 4: # optionally handled quoted package names
1.1 jlam 5: .if defined(PKGNAME_REQD)
1.17 joerg 6: PYTHON_VERSION_REQD?= ${PKGNAME_REQD:C/(^.*-|^)py([0-9][0-9])-.*/\2/}
1.1 jlam 7: .endif
8:
9: .include "../../lang/python/pyversion.mk"
10:
11: .if defined(PYBINMODULE)
12: .if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "vax"
1.13 rillig 13: PKG_FAIL_REASON+= "${PKGNAME} needs dynamic loading"
1.1 jlam 14: .endif
15: .endif
16:
17: .if defined(PYDISTUTILSPKG)
1.15 joerg 18: .include "../../mk/bsd.prefs.mk"
19:
1.1 jlam 20: PYSETUP?= setup.py
21: PYSETUPBUILDARGS?= #empty
22: PYSETUPINSTALLARGS?= #empty
1.5 recht 23: PYSETUPOPTARGS?= -c -O1
1.16 joerg 24: _PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS} ${_PYSETUPTOOLSINSTALLARGS}
1.15 joerg 25: .if ${_USE_DESTDIR} != "no"
26: _PYSETUPINSTALLARGS+= --root=${DESTDIR:Q}
27: .endif
1.1 jlam 28: PY_PATCHPLIST?= yes
1.3 jdolecek 29: PYSETUPSUBDIR?= #empty
1.1 jlam 30:
1.18 ! tnn 31: PY_NO_EGG?= yes
! 32: .if !empty(PY_NO_EGG:M[yY][eE][sS])
! 33: # see python25/patches/patch-av
! 34: INSTALL_ENV+= PKGSRC_PYTHON_NO_EGG=defined
! 35: .endif
! 36:
1.1 jlam 37: do-build:
1.3 jdolecek 38: (cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${MAKE_ENV} ${PYTHONBIN} \
1.4 recht 39: ${PYSETUP} build ${PYSETUPBUILDARGS})
1.1 jlam 40:
41: do-install:
1.18 ! tnn 42: (cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
! 43: ${PYTHONBIN} ${PYSETUP} "install" ${_PYSETUPINSTALLARGS})
1.1 jlam 44: .endif
45:
46: .if defined(PY_PATCHPLIST)
47: PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
48: .endif
CVSweb <webmaster@jp.NetBSD.org>