How to control (or avoid) brp-python-bytecompile

David Malcolm dmalcolm at redhat.com
Thu Apr 29 20:06:41 UTC 2010


On Thu, 2010-04-29 at 22:43 +0300, Debarshi Ray wrote:
> Anjuta carries a bunch of template sources which are filled up at
> runtime to generate source files for various kinds of projects. These
> are placed in /usr/share/anjuta/project. Now
> /usr/lib/rpm/brp-python-bytecompile is trying to byte compile the
> Python templates, which are obviously not syntactically correct Python
> sources. This is failing the build:
> http://koji.fedoraproject.org/koji/getfile?taskID=2146714&name=build.log
> 
> How do I work around this?

There is some magic for doing this given on this wiki page:
https://fedoraproject.org/wiki/Packaging:Python#Bytecompiling_with_the_correct_python_version

which I'll quote inline here:

# Turn off the brp-python-bytecompile script
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')

though clearly we need a cleaner way of doing that.


Hope this is helpful
Dave




More information about the devel mailing list