CFLAGS in python noarch packages

Paul Howarth paul at city-fan.org
Tue Jul 12 12:53:17 UTC 2005


The fedora-rpmdevtools package contains a template for a python package 
with %build as:

CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

This compares with the perl equivalent of:

CFLAGS="$RPM_OPT_FLAGS" %{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} OPTIMIZE="$RPM_OPT_FLAGS"

For perl noarch packages, it's usual to strip out the optimization 
flags, resulting in:

%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

Does the same apply in python, i.e. reduce to:

%{__python} setup.py build

Looking at a few python packages in cvs, everyone seems to be retaining 
the CFLAGS setting; is this necessary or even useful?

Paul.




More information about the fedora-extras-list mailing list