Annotation of pkgsrc/lang/python/extension.mk, revision 1.19
1.19 ! abs 1: # $NetBSD: extension.mk,v 1.18 2008/04/24 01:39:25 tnn 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:
31: do-build:
1.3 jdolecek 32: (cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${MAKE_ENV} ${PYTHONBIN} \
1.4 recht 33: ${PYSETUP} build ${PYSETUPBUILDARGS})
1.1 jlam 34:
35: do-install:
1.18 tnn 36: (cd ${WRKSRC}/${PYSETUPSUBDIR} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
37: ${PYTHONBIN} ${PYSETUP} "install" ${_PYSETUPINSTALLARGS})
1.1 jlam 38: .endif
39:
1.19 ! abs 40: PY_NO_EGG?= yes
! 41: .if !empty(PY_NO_EGG:M[yY][eE][sS])
! 42: # see python25/patches/patch-av
! 43: INSTALL_ENV+= PKGSRC_PYTHON_NO_EGG=defined
! 44: .endif
! 45:
1.1 jlam 46: .if defined(PY_PATCHPLIST)
47: PLIST_SUBST+= PYINC=${PYINC} PYSITELIB=${PYSITELIB}
48: .endif
CVSweb <webmaster@jp.NetBSD.org>