256e2803f4
(The former might be used for Python2 as well, but it needs more testing.)
47 lines
1.6 KiB
Makefile
47 lines
1.6 KiB
Makefile
# $NetBSD: egg.mk,v 1.14 2012/07/25 19:07:49 drochner Exp $
|
|
#
|
|
# Common logic to handle Python Eggs
|
|
#
|
|
.include "../../mk/bsd.fast.prefs.mk"
|
|
.include "../../lang/python/pyversion.mk"
|
|
|
|
# This file should be included to package python "distributions" which
|
|
# use setuptools to create an egg. Some distributions use distutils,
|
|
# which creates an egg-info file; those should use distutils.mk
|
|
|
|
EGG_NAME?= ${DISTNAME}
|
|
|
|
PYDISTUTILSPKG= yes
|
|
PY_PATCHPLIST= yes
|
|
|
|
# True eggs always have an egg-info directory, and thus there is no
|
|
# PLIST conditional (as in distutils.mk for old versions of python).
|
|
# Note that we substitute EGG_INFODIR rather than EGG_FILE, because
|
|
# the egg information in an egg comprises multiple files in an
|
|
# egg-info directory.
|
|
|
|
# XXX The PLIST substitution of EGG_NAME does not appear to be
|
|
# necessary. Either it should be removed or a comment added
|
|
# explaining why it is necessary.
|
|
|
|
PLIST_SUBST+= EGG_NAME=${EGG_NAME}-py${PYVERSSUFFIX}
|
|
PLIST_SUBST+= EGG_INFODIR=${EGG_NAME}-py${PYVERSSUFFIX}.egg-info
|
|
PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}.egg-info/, \
|
|
"$${EGG_INFODIR}") }
|
|
PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \
|
|
"$${EGG_NAME}-nspkg.pth") }
|
|
|
|
_PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed
|
|
.if ${_USE_DESTDIR} == "no"
|
|
_PYSETUPTOOLSINSTALLARGS+= --root=/
|
|
.endif
|
|
|
|
.if ${_PYTHON_VERSION} == "31" || ${_PYTHON_VERSION} == "32"
|
|
DEPENDS+= ${PYPKGPREFIX}-distribute-[0-9]*:../../devel/py-distribute
|
|
.else
|
|
DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.6c9:../../devel/py-setuptools
|
|
.endif
|
|
|
|
INSTALLATION_DIRS+= ${PYSITELIB}
|
|
|
|
.include "../../lang/python/extension.mk"
|