Re: [Ganglia-developers] [Ganglia-general] python modules .pyc files

2007-11-09 Thread Carlo Marcelo Arenas Belon
On Thu, Nov 08, 2007 at 09:20:26AM -0800, Bernard Li wrote:
 Anybody else have comments on this?

http://fedoraproject.org/wiki/Packaging/Python

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 .pyc files

2007-11-09 Thread Bernard Li
Hi Brad:

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.

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


Re: [Ganglia-developers] [Ganglia-general] python modules .pyc files

2007-11-09 Thread Brad Nicholes
 On 11/9/2007 at 2:29 PM, in message
[EMAIL PROTECTED], Bernard Li
[EMAIL PROTECTED] wrote:
 Hi Brad:
 
 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.
 
 Cheers,
 
 Bernard

I'm still a little concerned about doing that because I'm not sure that it 
solves any real problem.  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.  But do whatever you believe is best.

Brad 


-
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 .pyc files

2007-11-09 Thread Marcus Rueckert
On 2007-11-09 14:55:16 -0700, Brad Nicholes wrote:
  On 11/9/2007 at 2:29 PM, in message
 [EMAIL PROTECTED], Bernard Li
 [EMAIL PROTECTED] wrote:
  Hi Brad:
  
  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.
  
  Cheers,
  
  Bernard
 
 I'm still a little concerned about doing that because I'm not sure
 that it solves any real problem.  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.  But do whatever you believe is best.
 

sadly rpm doesnt work this way. if the .pyc files are not in the %files
list the directory will not be deleted. that means you have to track
them at least as %ghost entries. given that building the .pyc files
during the build is rather simple. we could just ship them in the rpms

which is imho done on all distros.

darix

-- 
  openSUSE - SUSE Linux is my linux
  openSUSE is good for you
  www.opensuse.org

-
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 .pyc files

2007-11-08 Thread Bernard Li
Hi Brad:

On 11/8/07, Brad Nicholes [EMAIL PROTECTED] wrote:

 I guess the scenario that I am a little more worried about is the one where 
 the expected version of python was installed with the OS.  But for whatever 
 reason the user decided to upgrade to a newer python and then later they 
 installed Ganglia.  Ganglia might not work in that instance because the 
 precompiled .pyc files don't match their version of python.  The would have 
 to know to manually remove the .pyc files and allow the newer version of 
 python to recreate them.  Wouldn't it

Actually now that I think about it -- I am not sure whether this
scenario will ever happen.  Why?  Because let's say you're on a
RPM-based distribution.  The version of Python that comes with your
distro is 2.3.4.  AFAIK you cannot simply upgrade (as in uninstall and
install a newer version) of Python because there are other packages
depending on this specific version of Python.  So your option is to
build your own Python RPM and/or install from source.  Python is good
that they usually allow you to install multiple instances - i.e. 2.3.4
can co-exist with 2.5.  In that light, since both versions are
available, I do not think this is an issue.

Although on the other hand, I do not know how your code will handle a
system having multiple installations of Python.  Does it look for the
Python interpretor 'python' or would it look for 'python23' or
'python25', etc.?

 make more since to just remove all .pyc files from the python_module 
 directory during the uninstall section of the spec file.  Ganglia already 
 owns this directory and can probably safely assume that on an uninstall, 
 anything in that directory can be removed.

In theory I have no issue with this approach -- simply delete the .pyc
files in the dir during the %postun stage.

Anybody else have comments on 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