1 # $NetBSD: egg.mk,v 1.13 2011/12/16 12:57:17 gdt Exp $
3 # Common logic to handle Python Eggs
5 .include "../../mk/bsd.fast.prefs.mk"
6 .include "../../lang/python/pyversion.mk"
8 # This file should be included to package python "distributions" which
9 # use setuptools to create an egg. Some distributions use distutils,
10 # which creates an egg-info file; those should use distutils.mk
12 EGG_NAME?= ${DISTNAME}
17 # True eggs always have an egg-info directory, and thus there is no
18 # PLIST conditional (as in distutils.mk for old versions of python).
19 # Note that we substitute EGG_INFODIR rather than EGG_FILE, because
20 # the egg information in an egg comprises multiple files in an
23 # XXX The PLIST substitution of EGG_NAME does not appear to be
24 # necessary. Either it should be removed or a comment added
25 # explaining why it is necessary.
27 PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX}
28 PLIST_SUBST+= EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
29 PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info/, \
31 PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \
32 "$${EGG_NAME}-nspkg.pth") }
34 _PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed
35 .if ${_USE_DESTDIR} == "no"
36 _PYSETUPTOOLSINSTALLARGS+= --root=/
39 .if ${_PYTHON_VERSION} == "31" || ${_PYTHON_VERSION} == "32"
40 DEPENDS+= ${PYPKGPREFIX}-distribute-[0-9]*:../../devel/py-distribute
42 DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools
45 INSTALLATION_DIRS+= ${PYSITELIB}
47 .include "../../lang/python/extension.mk"