diff options
author | drochner <drochner> | 2001-05-14 13:41:32 +0000 |
---|---|---|
committer | drochner <drochner> | 2001-05-14 13:41:32 +0000 |
commit | 42c25d05319f9cbd50057c5036e8e49ba1cd8fef (patch) | |
tree | f6eff8bfcc16f6cc3a8298d83bd35b3b21d75b0c | |
parent | 2608b43be99609699e62dc5799e879f722e08728 (diff) | |
download | pkgsrc-42c25d05319f9cbd50057c5036e8e49ba1cd8fef.tar.gz |
first cut on a Makefile snippet for common python package stuff
-rw-r--r-- | pkgtools/python-mk/Makefile | 26 | ||||
-rw-r--r-- | pkgtools/python-mk/files/bsd.python.mk | 39 | ||||
-rw-r--r-- | pkgtools/python-mk/pkg/DESCR | 1 | ||||
-rw-r--r-- | pkgtools/python-mk/pkg/PLIST | 2 |
4 files changed, 68 insertions, 0 deletions
diff --git a/pkgtools/python-mk/Makefile b/pkgtools/python-mk/Makefile new file mode 100644 index 00000000000..6e19887a03a --- /dev/null +++ b/pkgtools/python-mk/Makefile @@ -0,0 +1,26 @@ +# $NetBSD: Makefile,v 1.1.1.1 2001/05/14 13:41:32 drochner Exp $ +# + +DISTNAME= python-mk-1.0 +CATEGORIES= pkgtools +MASTER_SITES= # empty +DISTFILES= # empty + +MAINTAINER= packages@netbsd.org +COMMENT= common functions for python "distutils" packages + +# not strictly needed +DEPENDS+= python>=1.6:../../lang/python + +EXTRACT_ONLY= # empty +NO_CHECKSUM= # defined +NO_CONFIGURE= # defined +NO_PATCH= # defined +NO_BUILD= # defined + +PYMKFILE= ${FILESDIR}/bsd.python.mk + +do-install: + ${INSTALL_SCRIPT} ${PYMKFILE} ${PREFIX}/share/mk + +.include "../../mk/bsd.pkg.mk" diff --git a/pkgtools/python-mk/files/bsd.python.mk b/pkgtools/python-mk/files/bsd.python.mk new file mode 100644 index 00000000000..15d759cd598 --- /dev/null +++ b/pkgtools/python-mk/files/bsd.python.mk @@ -0,0 +1,39 @@ +# $NetBSD: bsd.python.mk,v 1.1.1.1 2001/05/14 13:41:32 drochner Exp $ +# + +.if defined(PYBINMODULE) +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "vax" +IGNORE="${PKGNAME} needs dynamic loading" +.endif +.endif + +PYINC!= ${PYTHON} -c "import distutils.sysconfig; \ + print distutils.sysconfig.get_python_inc(0, \"\")" +PYSITELIB!= ${PYTHON} -c "import distutils.sysconfig; \ + print distutils.sysconfig.get_python_lib(0, 0, \"\")" + +.if defined(PYDISTUTILSPKG) +PYSETUP?= setup.py +PYSETUPBUILDARGS?= #empty +PYSETUPINSTALLARGS?= #empty +PY_PATCHPLIST?= yes + +do-build: + (cd ${WRKSRC} && ${PYTHON} ${PYSETUP} ${PYSETUPBUILDARGS} build) + +do-install: + (cd ${WRKSRC} && ${PYTHON} ${PYSETUP} ${PYSETUPINSTALLARGS} install) +.endif + +PY_PLIST_TEMPLATE?= ${PKGDIR}/PLIST +PY_PLIST_SRC?= ${WRKDIR}/.PLIST_SRC + +py_patchplist: + ${SED} "s|PYINC|${PYINC}|g;s|PYSITELIB|${PYSITELIB}|g" \ + <${PY_PLIST_TEMPLATE} >${PY_PLIST_SRC} + +.if defined(PY_PATCHPLIST) +PLIST_SRC?= ${PY_PLIST_SRC} + +pre-install: py_patchplist +.endif diff --git a/pkgtools/python-mk/pkg/DESCR b/pkgtools/python-mk/pkg/DESCR new file mode 100644 index 00000000000..a8335aa6f2c --- /dev/null +++ b/pkgtools/python-mk/pkg/DESCR @@ -0,0 +1 @@ +common functions for python "distutils" packages diff --git a/pkgtools/python-mk/pkg/PLIST b/pkgtools/python-mk/pkg/PLIST new file mode 100644 index 00000000000..6ae6d4ab646 --- /dev/null +++ b/pkgtools/python-mk/pkg/PLIST @@ -0,0 +1,2 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2001/05/14 13:41:32 drochner Exp $ +share/mk/bsd.python.mk |