| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: egg.mk,v 1.22 2016/05/28 11:23:46 richard Exp $ | | 1 | # $NetBSD: egg.mk,v 1.23 2016/06/01 09:44:52 wiz 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 | .include "../../lang/python/pyversion.mk" |
7 | | | 7 | |
8 | # This file should be included to package python "distributions" which | | 8 | # This file should be included to package python "distributions" which |
9 | # use setuptools to create an egg. Some distributions use distutils, | | 9 | # use setuptools to create an egg. Some distributions use distutils, |
10 | # which creates an egg-info file; those should use distutils.mk | | 10 | # which creates an egg-info file; those should use distutils.mk |
11 | | | 11 | |
12 | EGG_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g} | | 12 | EGG_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g} |
13 | EGG_INFODIR?= ${EGG_NAME}-py${PYVERSSUFFIX}.egg-info | | 13 | EGG_INFODIR?= ${EGG_NAME}-py${PYVERSSUFFIX}.egg-info |
14 | | | 14 | |
| @@ -32,18 +32,19 @@ PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py | | | @@ -32,18 +32,19 @@ PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py |
32 | "$${EGG_INFODIR}") } | | 32 | "$${EGG_INFODIR}") } |
33 | PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \ | | 33 | PRINT_PLIST_AWK+= { gsub(/${EGG_NAME}-py${PYVERSSUFFIX}-nspkg.pth/, \ |
34 | "$${EGG_NAME}-nspkg.pth") } | | 34 | "$${EGG_NAME}-nspkg.pth") } |
35 | | | 35 | |
36 | _PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed | | 36 | _PYSETUPTOOLSINSTALLARGS= --single-version-externally-managed |
37 | | | 37 | |
38 | DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.8:../../devel/py-setuptools | | 38 | DEPENDS+= ${PYPKGPREFIX}-setuptools>=0.8:../../devel/py-setuptools |
39 | | | 39 | |
40 | INSTALLATION_DIRS+= ${PYSITELIB} | | 40 | INSTALLATION_DIRS+= ${PYSITELIB} |
41 | | | 41 | |
42 | privileged-install-hook: fixup-egg-info | | 42 | privileged-install-hook: fixup-egg-info |
43 | .PHONY: fixup-egg-info | | 43 | .PHONY: fixup-egg-info |
44 | fixup-egg-info: # ensure egg-info directory contents are always 644 | | 44 | fixup-egg-info: # ensure egg-info directory contents are always 644 |
45 | ${TEST} -d "${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR}" && \ | | 45 | if ${TEST} -d "${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR}"; then \ |
46 | ${FIND} ${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR} -type f \ | | 46 | ${FIND} ${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR} -type f \ |
47 | -exec ${CHMOD} ${SHAREMODE} '{}' + | | 47 | -exec ${CHMOD} ${SHAREMODE} '{}' +; \ |
| | | 48 | fi |
48 | | | 49 | |
49 | .include "../../lang/python/extension.mk" | | 50 | .include "../../lang/python/extension.mk" |