FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 04-29-2010, 07:43 PM
Debarshi Ray
 
Default How to control (or avoid) brp-python-bytecompile

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?

Thanks,
Debarshi
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 04-29-2010, 07:59 PM
Mamoru Tasaka
 
Default How to control (or avoid) brp-python-bytecompile

Debarshi Ray wrote, at 04/30/2010 04:43 AM +9:00:
> 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?
>
> Thanks,
> Debarshi

Looking at /usr/lib/rpm/brp-python-bytecompile, it reads:
-------------------------------------------------
1 #!/bin/bash
2 errors_terminate=$2
-------------------------------------------------

and rpm --showrc shows:
-------------------------------------------------
-14: __os_install_post
/usr/lib/rpm/redhat/brp-compress
%{!?__debug_package:
/usr/lib/rpm/redhat/brp-strip %{__strip}
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump}
}
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip}
/usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build}
/usr/lib/rpm/redhat/brp-python-hardlink
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars}
%{nil}
-------------------------------------------------

So adding "%global _python_bytecompile_errors_terminate_build 0"
will perhaps workaround this issue (default is 1).

Regards,
Mamoru
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 04-29-2010, 08:04 PM
Matt McCutchen
 
Default How to control (or avoid) brp-python-bytecompile

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?

I would name the templates with an extension other than .py since they
are not Python source files in their current form.

--
Matt

--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 04-29-2010, 08:06 PM
David Malcolm
 
Default How to control (or avoid) brp-python-bytecompile

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_py thon_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


--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 
Old 04-30-2010, 06:25 AM
Debarshi Ray
 
Default How to control (or avoid) brp-python-bytecompile

> So adding "%global _python_bytecompile_errors_terminate_build 0"
> will perhaps workaround this issue (default is 1).

This looks good because I do not want to completely turn the
bytecompiler off. I will give this a try.

Cheers,
Debarshi
--
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel
 

Thread Tools




All times are GMT. The time now is 12:57 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org