Le 08/04/2013 13:57, John Cremona a écrit :
On 8 April 2013 12:50, Ralf Hemmecke<hemme...@gmail.com>  wrote:
On 04/08/2013 01:39 PM, David Roe wrote:
There are various people working on making this possible, but it requires a
lot of changes to Sage's packaging system.  As Jeroen says, this is not
currently possible.

Thanks, but then another question. We have Sage installed centrally and
would like to give people a chance to say something like "sage -i
some-spkg".

Does Sage allow to install packages locally in $HOME while a (read-only)
vanilla Sage is in /opt/sage?


They could take a local copy of the whole build in their own directory
and then use that, if they have plenty of space (a vanilla build of
5.9.beta4 takes up 3.5GB).

Or instead of a real local copy, only have the same directory structure and symlinks for the files. That's basically what I do to test how good debian packages are for the sage packaging effort.

The functions I use look like:

def create_directory(name):
    try:
        os.makedirs(name)
        if verbose:
            print (u'create_directory(%s)' % name)
    except:
        pass

def symlink_file(source, target):
    try:
        os.symlink(source, target)
        if verbose:
            print (u'symlink(%s, %s)' % (source, target))
    except:
        pass

def symlink_directory(source, target):
    create_directory(target)
    for name in os.listdir(source):
        next_source=os.path.join(source, name)
        next_target=os.path.join(target, name)
        if os.path.isdir(next_source):
            symlink_directory(next_source, next_target)
        else:
            symlink_file(next_source, next_target)

I hope that helps,

Snark on #sagemath

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to