From: Stuart Henderson Subject: Re: archivers/py-zstandard: improve tests To: Klemens Nanni Cc: OpenBSD ports , "Kirill A. Korinsky" Date: Thu, 24 Oct 2024 22:00:03 +0100 On 2024/10/24 19:13, Klemens Nanni wrote: > 24.10.2024 17:46, Stuart Henderson пишет: > > On 2024/10/20 15:32, Klemens Nanni wrote: > >>>> + > >>>> +.if ${MODPY_TEST_LINK_SO:L} == "yes" && !empty(MODPY_TEST_LIBDIR) > >>>> +MODPY_TEST_TARGET := for _dir in ${MODPY_TEST_LIBDIR:S,:, ,g}; do \ > >>>> + if [ -e $$$${_dir} ]; then \ > >>>> + cd $$$${_dir} && \ > >>>> + find . -name '*.so' -type f \ > >>>> + -exec ln -sf $$$${_dir}/{} ${WRKSRC}/{} \; ;\ > >>>> + fi; done; ${MODPY_TEST_TARGET} > >>>> +.endif > >>> > >>> Looks fine make-wise, but I lack python experience to judge the approach itself. > >>> > >>> I think you can do without double-escaping and prepending the target variable > >>> by using your own and using it fist, this way it looks a clearer; diff below. > >>> > >>>> + > >>>> + > >>>> # dirty way to do it with no modifications in bsd.port.mk > >>>> .if empty(CONFIGURE_STYLE) > >>>> . if !target(do-build) > >>> > >>> Since that is a default-off opt-in, I'm fine committing it and tweaking in-tree. > >>> > >>> Feedback or OKs for either of the two diffs? > >> > >> None so far, we'll land this in a bit unless there's objection. > > > > Can I have a diff rather than a "either of two diffs" to look at > > please? > > Sure, here's the same diff I sent out last time. > > Index: lang/python/python.port.mk > =================================================================== > RCS file: /cvs/ports/lang/python/python.port.mk,v > diff -u -p -r1.192 python.port.mk > --- lang/python/python.port.mk 25 Jul 2024 15:42:03 -0000 1.192 > +++ lang/python/python.port.mk 5 Oct 2024 10:16:58 -0000 > @@ -303,6 +303,18 @@ MODPY_COMPILEALL = ${MODPY_BIN} -m compi > MODPY_COMPILEALL = ${MODPY_BIN} -m compileall -j ${MAKE_JOBS} -s ${WRKINST} -o 0 -o 1 > .endif > > +MODPY_TEST_TARGET = > +MODPY_TEST_LINK_SO ?= No > +.if ${MODPY_TEST_LINK_SO:L} == "yes" && !empty(MODPY_TEST_LIBDIR) > +MODPY_TEST_SO_CMD = for _dir in ${MODPY_TEST_LIBDIR:S,:, ,g}; do \ > + if [ -e $${_dir} ]; then \ > + cd $${_dir} && \ I think that would be better to use "if [ -d" rather than -e. Otherwise OK sthen@