Dear Simon,

On Tue, 18 Nov 2008 02:27:24 -0800 (PST)
Simon King <[EMAIL PROTECTED]> wrote:
<snip>
> I still don't get it.

The problem is the PYTHONPATH, in the Sage environment. Putting foo.so
in $SAGE_LOCAL/lib doesn't work, since that is not in the PYTHONPATH.
Try

sage: sys.path

to see the locations searched for modules you try to import.

The Sage sources pass the tests, because the Sage library is installed
in the default PYTHONPATH, i.e., SAGE_LOCAL/lib/python2.5/site-packages.

For the doctesting to work, you need to add the path of your modules to
the PYTHONPATH in the Sage environment.

It seems that this should be working since Sage-3.1.3. First do

export SAGE_PATH=/path/to/your/foo.so/

Then include the "from foo import bar" line in your doctests, and run

/path/to/sage -t your_file.pyx

I only tried this on python files, so I don't know if there is a
problem with cython modules. If your module is already compiled, and in
the given directory, I don't see what can go wrong though.

Cheers,

Burcin

--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to