Ask Your Question
2

Navigating sage source code

asked 2012-10-15 14:20:54 +0100

rmp251 gravatar image

I'm thoroughly confused by the source code. I've downloaded and unpacked all the source code in spkg/standard and spkg/base, but what I get looks totally different from what I see when browsing the code online (http://hg.sagemath.org/sage-main/file...). Can someone please help me make sense of the source code? I just want to be able to navigate through the code that gets executed when some sage commands are invoked.

Thank you.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-10-15 15:13:17 +0100

If you've downloaded the source code for Sage but haven't built Sage yet (by typing 'make'), then as kcrisman says, the source code for the Sage library is packaged in SAGE_ROOT/spkg/standard/sage-5.2.spkg. So you could do this (starting from SAGE_ROOT):

$ cd spkg/standard
$ tar xfj sage-5.2.spkg
$ cd sage-5.2/sage

Then you can browse through the source code as found on line.

edit flag offensive delete link more
1

answered 2012-10-15 14:41:20 +0100

kcrisman gravatar image

Look in SAGE_ROOT/devel/sage/sage for what you linked to, where SAGE_ROOT is your Sage install directory, often called sage-5.2-ubuntu-my_version or something.

Most of the stuff in spkg/standard is the code for all the 90-odd components of Sage. The stuff in the sage-5.2.spkg-style spkg is the stuff for Sage proper.

edit flag offensive delete link more

Comments

Thanks I see that now. But that's from the installation. Why doesn't it give me that when I download the source (http://sagemath.org/download-source.html)?

rmp251 gravatar imagermp251 ( 2012-10-15 15:03:57 +0100 )edit

Note that if you've just downloaded the source code, there may not be anything in `SAGE_ROOT/devel/sage/sage`: it gets put there when Sage is built.

John Palmieri gravatar imageJohn Palmieri ( 2012-10-15 15:09:16 +0100 )edit

Yes, I guess the source code is provided assuming you want to build it, whereas I just wanted to look at it.

rmp251 gravatar imagermp251 ( 2012-10-15 15:24:10 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-10-15 14:20:54 +0100

Seen: 712 times

Last updated: Oct 15 '12