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