[Debian-science-sagemath] debugging

Ximin Luo infinity0 at debian.org
Sat Nov 19 00:48:00 UTC 2016


Jerome BENOIT:
> Hello,
> 
> Let assume taht I am in sagemath/sage . When I enter
> 
> $ ./sage -t -d --long src/sage/interfaces/gap.py
> 
> I get the desire output, and I can play with Pdb .
> 
> Now, if I modify src/sage/interfaces/gap.py by hand ,
> it appears that the modifications are not taking into account:
> what do I miss ?
> 

Hey Jerome, there are a few nuances with the sage testing process.

The doctest examples are read directly from sage/src/sage. If you edit a test case, you don't need to run the steps that Tobias mentioned.

However the actual sage code is run from the "installed copy" in debian/build/usr/lib/blah blah blah. So if you edit Sage code (i.e. outside of the docstrings) then you'll need to reinstall to debian/build.

Tobias' way might work, but if you have trouble with it, what I normally do is force debhelper to do a rebuild:

$ for i in debian/*.debhelper.log; do sed -i -e '/dh_auto_build/d' $i; done
$ DEB_BUILD_PROFILES=pkg.sagemath.ccache DEB_BUILD_OPTIONS="nodoc nocheck" debian/rules build
# ^ if you are impatient you can even ctrl-C this after setup.py finishes the "copying to debian/build" step
$ ( cd sage; ./sage -t -d --long src/sage/interfaces/gap.py )

Something like this... it should only recompile the affected files.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Debian-science-sagemath mailing list