| @@ -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 | |
11 | EGG_NAME?= ${DISTNAME} | | 12 | EGG_NAME?= ${DISTNAME} |
12 | | | 13 | |
13 | PYDISTUTILSPKG= yes | | 14 | PYDISTUTILSPKG= yes |
14 | PY_PATCHPLIST= yes | | 15 | PY_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 | |
26 | PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX} | | 27 | PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX} |
27 | PLIST_SUBST+= EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info | | 28 | PLIST_SUBST+= EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info |
28 | PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info/, \ | | 29 | PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info/, \ |
29 | "$${EGG_INFODIR}") } | | 30 | "$${EGG_INFODIR}") } |
30 | PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \ | | 31 | PRINT_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" |
| | | 40 | DEPENDS+= ${PYPKGPREFIX}-distribute-[0-9]*:../../devel/py-distribute |
| | | 41 | .else |
38 | DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools | | 42 | DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools |
| | | 43 | .endif |
39 | | | 44 | |
40 | INSTALLATION_DIRS+= ${PYSITELIB} | | 45 | INSTALLATION_DIRS+= ${PYSITELIB} |
41 | | | 46 | |
42 | .include "../../lang/python/extension.mk" | | 47 | .include "../../lang/python/extension.mk" |