| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: egg.mk,v 1.36 2022/02/08 17:19:50 gutteridge Exp $ | | 1 | # $NetBSD: egg.mk,v 1.37 2022/04/03 11:54:48 riastradh 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. | | 9 | # use setuptools to create an egg. |
10 | # | | 10 | # |
11 | # For wheel (*.whl) support, look at wheel.mk. | | 11 | # For wheel (*.whl) support, look at wheel.mk. |
12 | | | 12 | |
13 | EGG_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g} | | 13 | EGG_NAME?= ${DISTNAME:C/-([^0-9])/_\1/g} |
14 | EGG_INFODIR?= ${EGG_NAME}-py${PYVERSSUFFIX}.egg-info | | 14 | EGG_INFODIR?= ${EGG_NAME}-py${PYVERSSUFFIX}.egg-info |
| @@ -45,29 +45,28 @@ TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0- | | | @@ -45,29 +45,28 @@ TOOL_DEPENDS+= ${PYPKGPREFIX}-expat-[0- |
45 | do-build: ensurepip | | 45 | do-build: ensurepip |
46 | .PHONY: ensurepip | | 46 | .PHONY: ensurepip |
47 | | | 47 | |
48 | ensurepip: | | 48 | ensurepip: |
49 | ${SETENV} ${MAKE_ENV} ${PYTHONBIN} -m ensurepip --user | | 49 | ${SETENV} ${MAKE_ENV} ${PYTHONBIN} -m ensurepip --user |
50 | .else | | 50 | .else |
51 | . if "${PYVERSSUFFIX}" == "2.7" | | 51 | . if "${PYVERSSUFFIX}" == "2.7" |
52 | SETUPTOOLS_PATH=../../devel/py-setuptools44 | | 52 | SETUPTOOLS_PATH=../../devel/py-setuptools44 |
53 | . else | | 53 | . else |
54 | SETUPTOOLS_PATH=../../devel/py-setuptools | | 54 | SETUPTOOLS_PATH=../../devel/py-setuptools |
55 | . endif | | 55 | . endif |
56 | . if "${USE_PKG_RESOURCES}" == "yes" | | 56 | . if "${USE_PKG_RESOURCES}" == "yes" |
57 | DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:${SETUPTOOLS_PATH} | | 57 | DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:${SETUPTOOLS_PATH} |
58 | . else | | | |
59 | TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:${SETUPTOOLS_PATH} | | | |
60 | . endif | | 58 | . endif |
| | | 59 | TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:${SETUPTOOLS_PATH} |
61 | .endif | | 60 | .endif |
62 | | | 61 | |
63 | INSTALLATION_DIRS+= ${PYSITELIB} | | 62 | INSTALLATION_DIRS+= ${PYSITELIB} |
64 | | | 63 | |
65 | privileged-install-hook: fixup-egg-info | | 64 | privileged-install-hook: fixup-egg-info |
66 | .PHONY: fixup-egg-info | | 65 | .PHONY: fixup-egg-info |
67 | fixup-egg-info: # ensure egg-info directory contents are always 644 | | 66 | fixup-egg-info: # ensure egg-info directory contents are always 644 |
68 | if ${TEST} -d "${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR}"; then \ | | 67 | if ${TEST} -d "${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR}"; then \ |
69 | ${FIND} ${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR} -type f \ | | 68 | ${FIND} ${DESTDIR}${PREFIX}/${PYSITELIB}/${EGG_INFODIR} -type f \ |
70 | -exec ${CHMOD} ${SHAREMODE} '{}' +; \ | | 69 | -exec ${CHMOD} ${SHAREMODE} '{}' +; \ |
71 | fi | | 70 | fi |
72 | | | 71 | |
73 | .include "../../lang/python/extension.mk" | | 72 | .include "../../lang/python/extension.mk" |