Re: [Ganglia-developers] [Ganglia-general] python modules .py{c,o}

2007-11-09 Thread Carlo Marcelo Arenas Belon
On Fri, Nov 09, 2007 at 02:55:16PM -0700, Brad Nicholes wrote:
 Bernard Li [EMAIL PROTECTED] wrote:
  On 11/9/07, Carlo Marcelo Arenas Belon [EMAIL PROTECTED] wrote:
  
  http://fedoraproject.org/wiki/Packaging/Python 
  
  If it's okay with you, I will follow the instructions in the wiki docs
  to add the .pyc files to the RPM.

and the .pyo

 I'm still a little concerned about doing that because I'm not sure that it 
 solves any real problem.

will solve the problem getting a selinux or any other MAC to reject the
creation of the .pyc or .pyo files because there are missing from gmond's
expected privileges.

 I would rather just clean up the python directory completely rather than 
 deliver .pyc files.  In a standard case, the .py files from one package might 
 be put down in the same location as another package's .py files.  In this 
 case if the first package has to uninstall, it would obviously have to know 
 which .pyc files it owns.  In our case, we own the directory where the .py 
 and .pyc files are located.  I think it would be easier and safer to just 
 remove the directory.

if you don't want to package them (and go against fedora's packaging policy on
that) then we should then create them at installation time through %post and
remove them at uninstallation time through %preun just like the debian package
is going to do if the packager follows their packaging guidelines :

http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html#s-bytecompilation

 But do whatever you believe is best.

as I mentioned before there is no best, and it is a packager decision to go
with either of the conflicting alternatives; as far as they are implemented
correctly.

Carlo

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers


Re: [Ganglia-developers] [Ganglia-general] python modules .py{c,o}

2007-11-09 Thread Bernard Li
Hi Carlo:

On 11/9/07, Carlo Marcelo Arenas Belon [EMAIL PROTECTED] wrote:

   If it's okay with you, I will follow the instructions in the wiki docs
   to add the .pyc files to the RPM.

 and the .pyo

I don't see much benefit to include .pyo files -- the main reason why
I brought up the whole .pyc issue was because they are generated
during run time -- .pyo files are not and basically is a version that
has docstrings stripped out.  From the manual:

http://docs.python.org/tut/node8.html#SECTION00812

Passing two -O flags to the Python interpreter (-OO) will cause the
bytecode compiler to perform optimizations that could in some rare
cases result in malfunctioning programs. Currently only __doc__
strings are removed from the bytecode, resulting in more compact .pyo
files. Since some programs may rely on having these available, you
should only use this option if you know what you're doing.

  But do whatever you believe is best.

 as I mentioned before there is no best, and it is a packager decision to go
 with either of the conflicting alternatives; as far as they are implemented
 correctly.

As packaging documentations from both Fedora and SUSE mention that
they should be included, I have decided to include the .pyc files.

I hope that Brad is okay with this :-)

Cheers,

Bernard

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers