Friday, January 26, 2018

Re: python.port.mk: Respect SEPARATE_BUILD in MODPY_DISTUTILS_BUILD

On Thu, Jan 25, 2018 at 11:22:30PM +0100, Klemens Nanni wrote:
> Out-of-tree builds for simple python ports are currently built in WRKSRC
> even when SEPARATE_BUILD is set.
>
> Simple example:
>
> $ cd /usr/ports/www/linkchecker
> $ make build
> [...]
> $ make show='SEPARATE_BUILD WRKSRC WRKBUILD'
> SEPARATE_BUILD=Yes
> WRKSRC=/usr/obj/ports/linkchecker-9.3/linkchecker-upstream-9.3
> WRKBUILD=/usr/obj/ports/linkchecker-9.3/build-amd64
> $ ls `make show=WRKBUILD`
> $
>
> That's because MODPY_DISTUTILS_BUILD hardcodes WRKSRC, the following
> diff changes that to WRKBUILD which defaults to WRKSRC if SEPARATE_BUILD
> set to "no".
>
> Tested successfully with ports like www/linkchecker and sysutils/ranger.
>
> Feedback?
>
> Index: lang/python/python.port.mk
> ===================================================================
> RCS file: /cvs/ports/lang/python/python.port.mk,v
> retrieving revision 1.95
> diff -u -p -r1.95 python.port.mk
> --- lang/python/python.port.mk 8 Jul 2017 08:28:00 -0000 1.95
> +++ lang/python/python.port.mk 25 Jan 2018 21:49:23 -0000
> @@ -128,7 +128,7 @@ MODPY_SITEPKG = ${MODPY_LIBDIR}/site-pa
> MODPY_SETUP ?= setup.py
>
> # build or build_ext are commonly used
> -MODPY_DISTUTILS_BUILD ?= build --build-base=${WRKSRC}
> +MODPY_DISTUTILS_BUILD ?= build --build-base=${WRKBUILD}
>
> .if ${MODPY_SETUPUTILS:L} == "yes"
> MODPY_DISTUTILS_INSTALL ?= install --prefix=${LOCALBASE} \
The main person to ask is the current python maintainer... not me.

Especially for stuff that's not really bsd.port.mk-dependent, but obviously
python-land.

Remi ?

No comments:

Post a Comment