summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2007-08-09 13:24:12 +0000
committerjoerg <joerg@pkgsrc.org>2007-08-09 13:24:12 +0000
commit2a3a65e1e2c3e0b602842b1e0cdc3489f3625679 (patch)
treef199405a02ca8a63f3b80cd7b67aa9e7518ff595 /lang
parent1258066035170df9eb29a10e0d0dd6edfc12888f (diff)
downloadpkgsrc-2a3a65e1e2c3e0b602842b1e0cdc3489f3625679.tar.gz
Add some basic infrastructure to manage Python eggs in pkgsrc.
We use the flat installation mode (e.g. no multiple versions by default) by default. That avoids having to run DEINSTALL/INSTALL scripts and allows DESTDIR installation.
Diffstat (limited to 'lang')
-rw-r--r--lang/python/egg.mk21
-rw-r--r--lang/python/extension.mk4
2 files changed, 23 insertions, 2 deletions
diff --git a/lang/python/egg.mk b/lang/python/egg.mk
new file mode 100644
index 00000000000..548b5e47a17
--- /dev/null
+++ b/lang/python/egg.mk
@@ -0,0 +1,21 @@
+# $NetBSD: egg.mk,v 1.1 2007/08/09 13:24:12 joerg Exp $
+#
+# Common logic to handle Python Eggs
+#
+.include "../../mk/bsd.prefs.mk"
+
+PYDISTUTILSPKG= yes
+PY_PATCHPLIST= yes
+# Only Python 2.4 support by devel/py-setuptools right now
+PYTHON_VERSIONS_ACCEPTED?= 24
+
+PLIST_SUBST+= EGG_NAME=${EGGNAME}-py${PYVERSSUFFIX}
+PLIST_SUBST+= EGG_INFODIR=${EGGNAME}-py${PYVERSSUFFIX}.egg-info
+
+_PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed
+
+DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c6:../../devel/py-setuptools
+
+INSTALLATION_DIRS+= ${PYSITELIB}
+
+.include "../../lang/python/extension.mk"
diff --git a/lang/python/extension.mk b/lang/python/extension.mk
index f354b50556b..432dcfcaddf 100644
--- a/lang/python/extension.mk
+++ b/lang/python/extension.mk
@@ -1,4 +1,4 @@
-# $NetBSD: extension.mk,v 1.15 2006/10/09 12:50:38 joerg Exp $
+# $NetBSD: extension.mk,v 1.16 2007/08/09 13:24:12 joerg Exp $
# derive a python version from the package name if possible
# optionally handled quoted package names
@@ -21,7 +21,7 @@ PYSETUP?= setup.py
PYSETUPBUILDARGS?= #empty
PYSETUPINSTALLARGS?= #empty
PYSETUPOPTARGS?= -c -O1
-_PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS}
+_PYSETUPINSTALLARGS= ${PYSETUPINSTALLARGS} ${PYSETUPOPTARGS} ${_PYSETUPTOOLSINSTALLARGS}
.if ${_USE_DESTDIR} != "no"
_PYSETUPINSTALLARGS+= --root=${DESTDIR:Q}
.endif