#19905: Upgrade PARI/GP to latest master
--------------------------------------+------------------------
       Reporter:  buck                |        Owner:
           Type:  PLEASE CHANGE       |       Status:  new
       Priority:  major               |    Milestone:  sage-7.0
      Component:  packages: standard  |   Resolution:
       Keywords:                      |    Merged in:
        Authors:                      |    Reviewers:  jdemeyer
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+------------------------
Changes (by buck):

 * cc: rws (added)
 * reviewer:   => jdemeyer
 * component:  PLEASE CHANGE => packages: standard


Comment:

 This is what I have so far, but I see that
 `src/sage/libs/pari/paridecl.pxd` needs to be updated.
 @jdemeyer: How is this file maintained? I don't trust my ability to do
 this accurately, manually. It seems like something that should also be
 done by the autogen/pari system.



 {{{#!diff
 diff --git a/build/pkgs/pari/checksums.ini b/build/pkgs/pari/checksums.ini
 index c62c530..aabe08d 100644
 --- a/build/pkgs/pari/checksums.ini
 +++ b/build/pkgs/pari/checksums.ini
 @@ -1,4 +1,4 @@
  tarball=pari-VERSION.tar.gz
 -sha1=fa23e0c8b6e38a356048d19224dc9b9658d77724
 -md5=c753faaa4780de5ad8d461f0ffd70ecf
 -cksum=1220765312
 +sha1=55299bfe042da491648897e830030083809d9967
 +md5=97738f8e92bba498f7dfd723c8e9d910
 +cksum=1221580104
 diff --git a/build/pkgs/pari/package-version.txt b/build/pkgs/pari
 /package-version.txt
 index 2b25bd1..5fdd71e 100644
 --- a/build/pkgs/pari/package-version.txt
 +++ b/build/pkgs/pari/package-version.txt
 @@ -1 +1 @@
 -2.8-1813-g6157df4.p0
 +2.8-2230-g450ce38
 diff --git a/build/pkgs/pari/patches/public_memory_functions.patch
 b/build/pkgs/pari/patches/public_memory_functions.patch
 index b3726d7..ee14fa4 100644
 --- a/build/pkgs/pari/patches/public_memory_functions.patch
 +++ b/build/pkgs/pari/patches/public_memory_functions.patch
 @@ -9,9 +9,9 @@ index 7067183..4ede6ed 100644
  +void *  pari_mainstack_malloc(size_t size);
  +void    pari_mainstack_mfree(void *s, size_t size);
  +void    pari_mainstack_free(struct pari_mainstack *st);
 - void    paristack_alloc(size_t rsize, size_t vsize);
   void    paristack_newrsize(ulong newsize);
   void    paristack_resize(ulong newsize);
 + void    paristack_setsize(size_t rsize, size_t vsize);
  diff --git a/src/language/init.c b/src/language/init.c
  index 7b5922d..2a578d7 100644
  --- a/src/language/init.c
 diff --git a/src/sage_setup/autogen/pari/args.py
 b/src/sage_setup/autogen/pari/args.py
 index 57356b4..a2749df 100644
 --- a/src/sage_setup/autogen/pari/args.py
 +++ b/src/sage_setup/autogen/pari/args.py
 @@ -254,6 +254,16 @@ class PariArgumentPrec(PariArgumentClass):
          s = "        {name} = prec_bits_to_words({name})\n"
          return s.format(name=self.name)

 +class PariArgumentBitPrec(PariArgumentClass):
 +    def _typerepr(self):
 +        return "bitprec"
 +    def ctype(self):
 +        return "long"
 +    def always_default(self):
 +        return "0"
 +    def get_argument_name(self, namesiter):
 +        return "bitprecision"
 +
  class PariArgumentSeriesPrec(PariArgumentClass):
      def _typerepr(self):
          return "serprec"
 @@ -277,6 +287,7 @@ pari_arg_types = {
          'U': PariArgumentULong,
          'n': PariArgumentVariable,
          'p': PariArgumentPrec,
 +        'b': PariArgumentBitPrec,
          'P': PariArgumentSeriesPrec,

      # Codes which are known but not actually supported for Sage
 diff --git a/src/sage_setup/autogen/pari/generator.py
 b/src/sage_setup/autogen/pari/generator.py
 index 7aa9990..9b78d88 100644
 --- a/src/sage_setup/autogen/pari/generator.py
 +++ b/src/sage_setup/autogen/pari/generator.py
 @@ -233,9 +233,9 @@ class PariFunctionGenerator(object):
          D = sorted(D.values(), key=lambda d: d['function'])
          sys.stdout.write("Generating PARI functions:")

 -        self.gen_file = open(self.gen_filename, 'w')
 +        self.gen_file = open(self.gen_filename + '.tmp', 'w')
          self.gen_file.write(gen_banner)
 -        self.instance_file = open(self.instance_filename, 'w')
 +        self.instance_file = open(self.instance_filename + '.tmp', 'w')
          self.instance_file.write(instance_banner)

          for v in D:
 @@ -249,3 +249,7 @@ class PariFunctionGenerator(object):

          self.gen_file.close()
          self.instance_file.close()
 +
 +        # All done? Let's commit.
 +        os.rename(self.gen_filename + '.tmp', self.gen_filename)
 +        os.rename(self.instance_filename + '.tmp',
 self.instance_filename)
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/19905#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to