Retrieving Sage source-code for reviewing not for building

198 views
Skip to first unread message

ccandide

unread,
Feb 11, 2013, 11:31:23 AM2/11/13
to sage-s...@googlegroups.com
I have downloaded Sage 5.6 source-code at http://www.sagemath.org/download-source.html in order to review the Python code written to implement the graph theory module. After decompressing, I have been surprised to see that no python/Cython/C code was available, only spkg files. I spotted a file named graphs-20120404.p4.spkg and unpacked it in hope of finding some python code, but nothing. 


So : could someone explain me how to retrieve "pure" and plain Sage source-code (whatever the language, whether it be C, Python, Cython, C++ etc) in order to read and inspect the code, not in order to build Sage from sources ?

John H Palmieri

unread,
Feb 11, 2013, 12:45:50 PM2/11/13
to sage-s...@googlegroups.com


On Monday, February 11, 2013 8:31:23 AM UTC-8, ccandide wrote:
I have downloaded Sage 5.6 source-code at http://www.sagemath.org/download-source.html in order to review the Python code written to implement the graph theory module. After decompressing, I have been surprised to see that no python/Cython/C code was available, only spkg files. I spotted a file named graphs-20120404.p4.spkg and unpacked it in hope of finding some python code, but nothing. 


So : could someone explain me how to retrieve "pure" and plain Sage source-code (whatever the language, whether it be C, Python, Cython, C++ etc) in order to read and inspect the code, not in order to build Sage from sources ?

The core Sage library is in the file spkg/standard/sage-5.6.spkg, so you can unpack that to see a lot of source code. (You can also browse the source code on-line at <http://trac.sagemath.org/sage_trac/browser>.) Most of the other spkg files come from other free open source packages which Sage uses and relies on, so really they contain other parts of the source code.

--
John

Nathann Cohen

unread,
Feb 11, 2013, 1:40:09 PM2/11/13
to sage-s...@googlegroups.com, Aurelien Lancin, Luc Hogie, Magali

I have downloaded Sage 5.6 source-code at http://www.sagemath.org/download-source.html in order to review the Python code written to implement the graph theory module.

Why would you do that ? Code is never wrong unless you look at it too closely. Then you will find a bug every third line and trouble starts. Don't do that. Don't read the graph code. It is very shy : it you read it, it will panic and produce bugs everywhere. You should be ashamed.

Nathann

Keshav Kini

unread,
Feb 11, 2013, 2:07:54 PM2/11/13
to sage-s...@googlegroups.com
John H Palmieri <jhpalm...@gmail.com> writes:
> The core Sage library is in the file spkg/standard/sage-5.6.spkg, so
> you can unpack that to see a lot of source code. (You can also browse
> the source code on-line at <http://trac.sagemath.org/sage_trac/
> browser>.) Most of the other spkg files come from other free open
> source packages which Sage uses and relies on, so really they contain
> other parts of the source code.

Note that the Trac browser is not updated automatically and is currently
very out of date. http://hg.sagemath.org/ is usually a better place to
look at the main Sage repositories (though the sage-root view is broken
at the moment due to Mercurial on boxen being too old).

-Keshav

ccandide

unread,
Feb 11, 2013, 3:51:58 PM2/11/13
to sage-s...@googlegroups.com


The core Sage library is in the file spkg/standard/sage-5.6.spkg, so you can unpack that to see a lot of source code.



Great, exactly what I was looking for! 


 
(You can also browse the source code on-line at <http://trac.sagemath.org/sage_trac/browser>.)


I was aware of this but I prefer reading code offfline. 


Thanks for your response.
 

Jeroen Demeyer

unread,
Feb 12, 2013, 3:46:24 AM2/12/13
to sage-s...@googlegroups.com
> You can also browse
> the source code on-line at <http://trac.sagemath.org/sage_trac/
> browser>.)

> Note that the Trac browser is not updated automatically and is currently
> very out of date.
Any idea on how to update this?

Keshav Kini

unread,
Feb 12, 2013, 7:39:08 PM2/12/13
to sage-s...@googlegroups.com
Upgrade the Sage installation at /usr/local/sage on boxen, or point trac
to some other repo by editing /var/trac/sage_trac/conf/trac.ini .

-Keshav

Reply all
Reply to author
Forward
0 new messages