1135
Comment:
|
← Revision 13 as of 2017-08-03 08:15:11 ⇥
1655
|
Deletions are marked like this. | Additions are marked like this. |
Line 3: | Line 3: |
This tutorial explains how to use a PARI/GP development version inside Sage. | This tutorial explains how to use a PARI/GP development version inside Sage. This is currently a bit hackish and the aim is to have this possibility natively supported (see [[https://groups.google.com/forum/#!topic/sage-devel/nTwhCV89FXE|this thread on sage-devel]]. |
Line 5: | Line 5: |
Prerequisites | == Prerequisites == |
Line 7: | Line 7: |
1. We assume that your PARI/GP source code is at $PARI_ROOT | 1. We assume that your PARI/GP source code is at `$PARI_ROOT` |
Line 9: | Line 9: |
2. You need to use a version of Sage compiled from source located at $SAGE_ROOT | 2. You need version of Sage compiled from source that is run with the command `sage` |
Line 11: | Line 11: |
Procedure | == Procedure == |
Line 15: | Line 15: |
2. Do {{{ |
2. Start Sage environment {{{ |
Line 19: | Line 18: |
$ source pari_build.sh # reading pari_build.sh | }}} 3. Optional step: apply Sage patches located in `$SAGE_ROOT/build/pkg/pari/patches`. 3. Compile pari {{{ $ cd $PARI_ROOT $ make clean # start with a clean slate $ source pari_sage.sh # reading pari_build.sh |
Line 25: | Line 31: |
3. Recompile cysignals {{{ |
3. Recompile cysignals {{{ |
Line 30: | Line 35: |
4. Compile the last version of cypari {{{ |
4. Compile the last version of cypari (this currently breaks, but [[https://github.com/defeo/cypari2/pull/28|this pull request fixes it]]) {{{ |
Line 35: | Line 39: |
5. Recompile what needs to be {{{ |
5. Recompile what needs to be {{{ |
Line 40: | Line 43: |
Procedure to restore the standard PARI package in Sage | == Procedure to restore the standard PARI package in Sage == |
Line 42: | Line 45: |
1. {{{ |
1. {{{ |
Step by step tutorial on how to use PARI/GP development version in Sage
This tutorial explains how to use a PARI/GP development version inside Sage. This is currently a bit hackish and the aim is to have this possibility natively supported (see this thread on sage-devel.
Prerequisites
We assume that your PARI/GP source code is at $PARI_ROOT
You need version of Sage compiled from source that is run with the command sage
Procedure
Download the script pari_sage.sh
Start Sage environment
$ cd $PARI_ROOT $ sage -sh # starts Sage environment
Optional step: apply Sage patches located in $SAGE_ROOT/build/pkg/pari/patches.
Compile pari
$ cd $PARI_ROOT $ make clean # start with a clean slate $ source pari_sage.sh # reading pari_build.sh $ pari_set_environment # setting properly environment variables for compilation $ pari_build # building pari $ pari_install # installing pari
Recompile cysignals
$ sage -f cysignals # recompile cysignals (to be linked correctly against pari)
Compile the last version of cypari (this currently breaks, but this pull request fixes it)
$ sage -pip install git+https://github.com/defeo/cypari2
Recompile what needs to be
$ sage -br
Procedure to restore the standard PARI package in Sage
$ sage -f pari $ sage -f cysignals $ sage -f cypari $ sage -br