Wed Jul 25 19:07:49 2012 UTC ()
use py-distribute for Python3 rather than py-setuptools
(The former might be used for Python2 as well, but it needs more
testing.)


(drochner)
diff -r1.13 -r1.14 pkgsrc/lang/python/egg.mk

cvs diff -r1.13 -r1.14 pkgsrc/lang/python/egg.mk (expand / switch to unified diff)

--- pkgsrc/lang/python/egg.mk 2011/12/16 12:57:17 1.13
+++ pkgsrc/lang/python/egg.mk 2012/07/25 19:07:49 1.14
@@ -1,18 +1,19 @@ @@ -1,18 +1,19 @@
1# $NetBSD: egg.mk,v 1.13 2011/12/16 12:57:17 gdt Exp $ 1# $NetBSD: egg.mk,v 1.14 2012/07/25 19:07:49 drochner Exp $
2# 2#
3# Common logic to handle Python Eggs 3# Common logic to handle Python Eggs
4# 4#
5.include "../../mk/bsd.fast.prefs.mk" 5.include "../../mk/bsd.fast.prefs.mk"
 6.include "../../lang/python/pyversion.mk"
6 7
7# This file should be included to package python "distributions" which 8# This file should be included to package python "distributions" which
8# use setuptools to create an egg. Some distributions use distutils, 9# use setuptools to create an egg. Some distributions use distutils,
9# which creates an egg-info file; those should use distutils.mk 10# which creates an egg-info file; those should use distutils.mk
10 11
11EGG_NAME?= ${DISTNAME} 12EGG_NAME?= ${DISTNAME}
12 13
13PYDISTUTILSPKG= yes 14PYDISTUTILSPKG= yes
14PY_PATCHPLIST= yes 15PY_PATCHPLIST= yes
15 16
16# True eggs always have an egg-info directory, and thus there is no 17# True eggs always have an egg-info directory, and thus there is no
17# PLIST conditional (as in distutils.mk for old versions of python). 18# PLIST conditional (as in distutils.mk for old versions of python).
18# Note that we substitute EGG_INFODIR rather than EGG_FILE, because 19# Note that we substitute EGG_INFODIR rather than EGG_FILE, because
@@ -25,18 +26,22 @@ PY_PATCHPLIST= yes @@ -25,18 +26,22 @@ PY_PATCHPLIST= yes
25 26
26PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX} 27PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX}
27PLIST_SUBST+= EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info 28PLIST_SUBST+= EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
28PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info/, \ 29PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info/, \
29 "$${EGG_INFODIR}") } 30 "$${EGG_INFODIR}") }
30PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \ 31PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \
31 "$${EGG_NAME}-nspkg.pth") } 32 "$${EGG_NAME}-nspkg.pth") }
32 33
33_PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed 34_PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed
34.if ${_USE_DESTDIR} == "no" 35.if ${_USE_DESTDIR} == "no"
35_PYSETUPTOOLSINSTALLARGS+= --root=/ 36_PYSETUPTOOLSINSTALLARGS+= --root=/
36.endif 37.endif
37 38
 39.if ${_PYTHON_VERSION} == "31" || ${_PYTHON_VERSION} == "32"
 40DEPENDS+= ${PYPKGPREFIX}-distribute-[0-9]*:../../devel/py-distribute
 41.else
38DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools 42DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools
 43.endif
39 44
40INSTALLATION_DIRS+= ${PYSITELIB} 45INSTALLATION_DIRS+= ${PYSITELIB}
41 46
42.include "../../lang/python/extension.mk" 47.include "../../lang/python/extension.mk"