Ask Your Question
2

Navigating sage source code

asked 12 years ago

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.

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
2

answered 12 years ago

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.

Preview: (hide)
link
1

answered 12 years ago

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.

Preview: (hide)
link

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 ( 12 years ago )

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 ( 12 years ago )

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 ( 12 years ago )

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: 12 years ago

Seen: 760 times

Last updated: Oct 15 '12