#7355: Allow sage -i/-f to install packages without stating version number.
---------------------------+------------------------------------------------
   Reporter:  timdumol     |       Owner:  tbd       
       Type:  enhancement  |      Status:  needs_work
   Priority:  minor        |   Milestone:            
  Component:  packages     |    Keywords:            
Work_issues:               |      Author:            
   Reviewer:               |      Merged:            
---------------------------+------------------------------------------------
Changes (by ddrake):

  * status:  needs_review => needs_work


Comment:

 I'm looking at the proposed sage-latest-online-package script and have
 some comments.

 I don't really like the 'list.tmp' temporary file business. It's nice to
 check if the user has the permissions to upgrade, but I think doing so
 should be the job of whatever actually does the upgrade. The name of the
 script implies that it tells you the latest online package name, and I'd
 like to see it do ''only'' that.

 I see that urlretrieve always uses a temporary file automatically (which
 gets deleted automatically), so perhaps we could do the first part of
 spkg_list like so:
 {{{
 web_url = "%s/%s"%(PKG_SERVER, url)
 fn = urllib.urlretrieve(web_url)[0]
 r = open(fn).read()
 [etc]
 }}}

 Also, when you build the list of spkgs, why do list(set(..)), then sort
 the list? The listings are alphabetized anyway, and if we run into a
 duplicate, the script will exit on the first occurrence anyway. It looks
 like just this will be fine:
 {{{
 return [x.strip()[:-5] for x in r if x.endswith('.spkg')]
 }}}
 instead of
 {{{
 v = list(set(...))
 v.sort
 return v
 }}}

 With the above changes, the script seems to work fine. I'd like to know if
 anyone uses a nonstandard SAGE_SERVER so we can make sure the script still
 works for such cases.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7355#comment:4>
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