[Distutils] bdist_rpm fails due to bytecompiled modules

Stefan Seefeld seefeld at sympatico.ca
Wed Dec 6 06:24:30 CET 2006

Phillip J. Eby wrote:
> At 11:28 PM 12/5/2006 -0500, Stefan Seefeld wrote:
>> Thus, I tried 'python setup.py bdist_rpm --install-script=install',
>> where the content of 'install' is
>> 'python setup.py install --optimize=1 --root=$RPM_BUILD_ROOT
>> --record=INSTALLED_FILES',
>> and voila ! It works !
> A simpler fix is to put:
> [install]
> optimize=1
> in the project's setup.cfg, or perhaps better yet, in ~/.pydistutils.cfg
> or in $prefix/lib/python2.x/distutils/distutils.cfg.  This will then
> always set --optimize=1 when install is invoked.

I was thinking about that, but couldn't figure out whether the project's setup.cfg
would be used when 'python setup.py install' is invoked from within rpmbuild.
The docs are silent about this (and other) precious detail(s).

Thanks for the tip !



      ...ich hab' noch einen Koffer in Berlin...

More information about the Distutils-SIG mailing list