[Fedora-packaging] Setting CFLAGS when building python packages

Sergio Pascual sergio.pasra at gmail.com
Fri Jul 5 14:27:42 UTC 2013


At the wiki page you mention, CFLAGS only appear in an example box about
packaging python3. If this a guideline, it is very well hidden. It should
be explicit.

Furthermore, "python setup.py build" runs with the RPM CFLAGS even if you
don't set the variable. Setting it mereley doubles the flags.


2013/7/5 Susi Lehtola <jussilehtola at fedoraproject.org>

> On Fri, 5 Jul 2013 12:02:58 +0200
> Sergio Pascual <sergio.pasra at gmail.com> wrote:
>
> > Hello,
> >
> >
> > I was wandering if it is still needed to put set CFLAGS before
> > compilling python extensions, like this:
> >
> > CFLAGS="%{optflags}" %{__python} setup.py build
> >
> > There is nothing about it in the guidelines, altough I recall reading
> > about it, so perhaps it was removed from the wiki?
> >
> > When comparing the compilation lines with and without setting CFLAGS,
> > I see lots of repeated switches but nothing clearly different.
>
> Well, it still seems to be implicitly at
>  https://fedoraproject.org/wiki/Packaging:Python
>
> You only need CFLAGS when there are C extensions used. If a package is
> pure python, it's noarch and doesn't need the CFLAGS.
> --
> Susi Lehtola
> Fedora Project Contributor
> jussilehtola at fedoraproject.org
> --
> packaging mailing list
> packaging at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/packaging
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/packaging/attachments/20130705/4205ac5d/attachment.html>


More information about the packaging mailing list