Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2017-07-31 09:31:15
Size: 416
Editor: vdelecroix
Comment:
Revision 11 as of 2017-07-31 12:08:05
Size: 1364
Editor: mmasdeu
Comment: Added make clean, since it may fail to compile otherwise.
Deletions are marked like this. Additions are marked like this.
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 13: Line 13:
    $ cd $PARI_ROOT
    $ source $SAGE_ROOT/build/pkgs/pari/spkg-install
    
 1. Download the script [[attachment:pari_sage.sh]]

 2. Start Sage environment {{{
$ cd $PARI_ROOT
$ sage -sh # starts Sage environment
}}}

 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
$ pari_set_environment # setting properly environment variables for compilation
$ pari_build # building pari
$ pari_install # installing pari
}}}

 3. Recompile cysignals {{{
$ sage -f cysignals # recompile cysignals (to be linked correctly against pari)
}}}

 4. Compile the last version of cypari {{{
$ sage -pip install git+https://github.com/defeo/cypari2
}}}

 5. Recompile what needs to be {{{
$ sage -br
}}}

== Procedure to restore the standard PARI package in Sage ==

 1. {{{
$ sage -f pari
$ sage -f cysignals
$ sage -f cypari
$ sage -br
}}}

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.

Prerequisites

  1. We assume that your PARI/GP source code is at $PARI_ROOT

  2. You need version of Sage compiled from source that is run with the command sage

Procedure

  1. Download the script pari_sage.sh

  2. Start Sage environment

    $ cd $PARI_ROOT
    $ sage -sh                # starts Sage environment
  3. Optional step: apply Sage patches located in $SAGE_ROOT/build/pkg/pari/patches.

  4. 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
  5. Recompile cysignals

    $ sage -f cysignals       # recompile cysignals (to be linked correctly against pari)
  6. Compile the last version of cypari

    $ sage -pip install git+https://github.com/defeo/cypari2
  7. Recompile what needs to be

    $ sage -br

Procedure to restore the standard PARI package in Sage

  1. $ sage -f pari
    $ sage -f cysignals
    $ sage -f cypari
    $ sage -br

PariDevInSage (last edited 2017-08-03 08:15:11 by vdelecroix)