#9992: Python scripts try to run before Python is built.
------------------------+---------------------------------------------------
   Reporter:  drkirkby  |       Owner:  GeorgSWeber
       Type:  defect    |      Status:  new        
   Priority:  major     |   Milestone:  sage-4.6   
  Component:  build     |    Keywords:             
     Author:            |    Upstream:  N/A        
   Reviewer:            |      Merged:             
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by drkirkby):

 Replying to [comment:1 leif]:
 > Well, perhaps one should simply suppress (or avoid) the error message in
 case no Python is (yet) installed, but the script is really odd.

 Or just not check if python is not run.

 >  * It should only test (and modify) scripts that are executable.

 Yes. At the minute it tests binaries too.

 >  * It "rewrites" '''every''' file that contains {{{python}}} and
 {{{#!}}} in its first line, so even already correct (and already modified)
 files starting with
 >    {{{
 > #!/usr/bin/env python
 > }}}
 >    will get rewritten.

 That's not such a big deal.

 >  * It makes all these files writable (but only for the owner).



 > I don't agree moving its functionality into {{{sage-spkg}}} is a good
 idea. (IIRC it is called by other scripts as well, and {{{sage-spkg}}}
 shouldn't be blown up too much.)

 OK, well this is easy to fix by putting an

 if [ -f '$SAGE_LOCAL/bin/python" ] ; then
    # Run the python script.
 fi

 I'll leave you to modify the python script if you want to.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9992#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to