Hi all,

I was wondering if there was a way to figure if a module from one
package is imported from another one and which one at that.

This is quite relevant to sage-on-distros. mpmath-1.2.0+ tries
to figure out if it is called from sage by detecting if SAGE_ROOT
is defined. Assuming that if it is this is a sage install.
Some reasoning at 
https://github.com/fredrik-johansson/mpmath/pull/466
the reasoning in question disregarded the fact that a sage-on-distro
package would also likely use a system mpmath.

But mpmath developers don’t want to just use sage if it is installed.
Only if it is explicitly required and available or because they
mpmath is called from sage.

MPMATH_SAGE could be set in the sage executable or sage-env but
that would cover the case where you import sage directly from 
python. Something that has been doable on sage-on-(some)-distros
for years and is quite doable in villa sage these days.

So I am wondering if there is a python way to say to mpmath, you
have been imported from sage.

Cheers,
François

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/D4CBBAD2-E1D1-4A10-B757-111008A02B92%40gmail.com.

Reply via email to