On 2019/10/03 00:01, Klemens Nanni wrote:
> On Mon, Sep 30, 2019 at 10:18:17AM +0100, Stuart Henderson wrote:
> > : $OpenBSD$
> > :
> > : Avoid cython due to build error:
> > : ValueError: 'rencode/rencode.pyx' doesn't match any files
> > :
> > : Remove platform specific optimizations.
> > :
> > : Index: setup.py
> > : --- setup.py.orig
> > : +++ setup.py
> > : @@ -36,12 +36,13 @@ except ImportError as ex:
> > : from setuptools.command.build_ext import build_ext
> > : cythonize = False
> > :
> > : +cythonize = False
> > : source_ext = ".pyx" if cythonize else ".c"
> > :
> > : ext_modules = [
> > : Extension(
> > : "rencode._rencode",
> > : - extra_compile_args=["-O3"],
> > : + extra_compile_args=["-O2"],
> > : sources=["rencode/rencode" + source_ext],
> > : ),
> > : ]
> > :
> >
> > It shouldn't force -O2 either ..
> Fair point. Instead of SUBST_CMD our CFLAGS here or so (which would be
> quirky since I'd have to transform it into a comma separated list for
> being a valid Python array), I just removed the line.
>
> Those flags are appended anyway to the very end of the cc(1) invocation
> which also contains and honours our CFLAGS (and thus DEBUG):
>
> cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG \
> -O2 -pipe -fPIC -O2 -pipe -O2 -pipe ${CFLAGS} -fPIC \
> -I/usr/local/include/python3.7m -c rencode/rencode.c \
> -o /usr/ports/pobj/py-rencode-1.0.6-python3/rencode-1.0.6/temp.openbsd-6.6-amd64-3.7/rencode/rencode.o \
> <extra_compile_args>
>
> That is taken from build output and I replaced CLFAGS and
> extra_compile_args so you can see; this looks safe to me as is.
>
> No other changes in the new tarball.
>
> Feedback? OK?
Thanks. That sounds like the right approach (iirc the last -O flag
on the line is the one which takes effect). OK
No comments:
Post a Comment