On Thu, 26 Sep 2013, David Coppa wrote:
>
> Why not getting rid of MODPY_BADEGGS and doing this instead:
>
> ---8<---
>
> Index: python.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/python/python.port.mk,v
> retrieving revision 1.72
> diff -u -p -u -p -r1.72 python.port.mk
> --- python.port.mk 24 Sep 2013 16:55:02 -0000 1.72
> +++ python.port.mk 26 Sep 2013 11:55:58 -0000
> @@ -118,12 +118,7 @@ MODPY_INCDIR = ${LOCALBASE}/include/pyt
> MODPY_LIBDIR = ${LOCALBASE}/lib/python${MODPY_VERSION}
> MODPY_SITEPKG = ${MODPY_LIBDIR}/site-packages
>
> -.if defined(MODPY_BADEGGS)
> -. for egg in ${MODPY_BADEGGS}
> -_MODPY_PRE_BUILD_STEPS += ;mkdir -p ${WRKBUILD}/${egg}.egg-info
> -. endfor
> -.endif
> -
> +_MODPY_PRE_BUILD_STEPS += ;${MODPY_CMD} egg_info
>
> # usually setup.py but Setup.py can be found too
> MODPY_SETUP ?= setup.py
>
> ---8<---
>
> This will assure the egg-info directory is always created with the
> right permissions...
>
> Comments?
Oops!
Now with everything in its right place:
Index: python.port.mk
===================================================================
RCS file: /cvs/ports/lang/python/python.port.mk,v
retrieving revision 1.72
diff -u -p -u -p -r1.72 python.port.mk
--- python.port.mk 24 Sep 2013 16:55:02 -0000 1.72
+++ python.port.mk 26 Sep 2013 12:19:08 -0000
@@ -91,6 +91,7 @@ MODPY_SETUPUTILS = Yes
# The setuptools uses test target
TEST_TARGET ?= test
_MODPY_USERBASE =
+_MODPY_PRE_BUILD_STEPS += ;${MODPY_CMD} egg_info
.else
# Try to detect the case where a port will build regardless of setuptools
# but the final plist will be different if it's present.
@@ -117,13 +118,6 @@ MODPY_BIN = ${LOCALBASE}/bin/python${MO
MODPY_INCDIR =
${LOCALBASE}/include/python${MODPY_VERSION}${MODPY_LIB_SUFFIX}
MODPY_LIBDIR = ${LOCALBASE}/lib/python${MODPY_VERSION}
MODPY_SITEPKG = ${MODPY_LIBDIR}/site-packages
-
-.if defined(MODPY_BADEGGS)
-. for egg in ${MODPY_BADEGGS}
-_MODPY_PRE_BUILD_STEPS += ;mkdir -p ${WRKBUILD}/${egg}.egg-info
-. endfor
-.endif
-
# usually setup.py but Setup.py can be found too
MODPY_SETUP ?= setup.py