JMH wrote:
Hi,
well, in general I could imagine that my "extra" package gets installed
into the "standard" Sage subdirectories (so that there would be no need
to set "PATH", "LD_LIBRARY_PATH", "PYTHONPATH", ...).

However, this is not really the desired situation.
In fact I need to make sure that I can have several versions of my
"extra" packages available simultaneously.
So, I install every version of my package into a separate chain of
version specific subdirectories (somewhere in "${SAGE_LOCAL}").
One is expected to "select" the exact version that one wants to use
during the "current" session using something like "export
MyVersion="SomeVersion"; ./sage" and then the "sage-env" script is
expected to take care that the requested version gets "loaded".

Moreover, some "extra" parts use/need some "environment variables", so I
need to make sure that they exist and that they point to "relevant" places.

So, I really need some kind of a "run-time" package initialization.
It seems to me that this is not foreseen now..

I think I would like to add a "general purpose" mechanism of "run-time"
package initialization into the standard "sage-env" script.
Will you incorporate such a mechanism into the "official" source code?
If yes, I could send you a "patch file".

Well, for "personal" use (on a user- rather than installation basis), we support $DOT_SAGE/sagerc (usually $HOME/.sage/sagerc). [There's also init.sage, which is a Sage/Python rather than shell script.]

For pulling in specific environment variable definitions (say) for a Sage installation, we support $SAGE_LOCAL/toolchain/toolchain-env.

Both are sourced by sage-env (if present), but none of them are supposed to get shipped with bdists or source tarballs (which I thought you were intending).


Alternatively, you could create scripts in $SAGE_LOCAL/bin/, which set up what you need and then run Sage, but you'd have to start/run these with './sage -c <my_script>'.

But perhaps creating Cython wrappers for your libraries / different library versions and dynamically loading these from within Sage is more appropriate for your use case. (Using different versions of stand-alone executables would be even easier. For such, see $SAGE_ROOT/devel/sage/sage/interfaces/.)

Although I agree settings for some Sage components (although most of them "standard") are currently rather hardcoded into Sage, e.g. for R, or matplotlib.


You'd probably have to elaborate further what exactly you're intending to get appropriate hints or help.


-leif

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
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