Opened 18 months ago
Closed 18 months ago
#28341 closed defect (fixed)
Allow doc to build with SAGE_PARI_CFG undefined
Reported by:  fbissey  Owned by:  

Priority:  major  Milestone:  sage8.9 
Component:  distribution  Keywords:  
Cc:  dimpase, ghtimokau  Merged in:  
Authors:  François Bissey  Reviewers:  Dima Pasechnik 
Report Upstream:  N/A  Work issues:  
Branch:  27f17ff (Commits)  Commit:  27f17ffa52d68349ea978cea1f2acc5c55e52c19 
Dependencies:  #28242  Stopgaps: 
Description
Follow up to #28242 which introduced SAGE_PARI_CFG
in documentation build to identity whether or not pari is external.
This is inconvenient to distros and the behavior for external pari
should be assumed if SAGE_PARI_CFG
is undefined.
Change History (12)
comment:1 Changed 18 months ago by
comment:2 Changed 18 months ago by
 Cc dimpase added
comment:3 followup: ↓ 7 Changed 18 months ago by
@Dima just so I don't make a mistake. ''
is the value you get when pari
is coming from the system?
comment:4 Changed 18 months ago by
 Cc ghtimokau added
comment:5 followup: ↓ 6 Changed 18 months ago by
using SAGE_PARI_CFG in docbuild is a hack. One should really test whether the external pari is multithreaded, this is something that can be done, I just didn't do.
SAGE_PARI_CFG is storing the location of pari.cfg, something hard to find out, and needed to install gp2c, see https://git.sagemath.org/sage.git/diff/build/pkgs/gp2c/spkgconfigure.m4?id=46772dbb31f2be940bda299136455f495c6a21dc
comment:6 in reply to: ↑ 5 Changed 18 months ago by
Replying to dimpase:
using SAGE_PARI_CFG in docbuild is a hack. One should really test whether the external pari is multithreaded, this is something that can be done, I just didn't do.
SAGE_PARI_CFG is storing the location of pari.cfg, something hard to find out, and needed to install gp2c, see https://git.sagemath.org/sage.git/diff/build/pkgs/gp2c/spkgconfigure.m4?id=46772dbb31f2be940bda299136455f495c6a21dc
Yes, I figured that out. On the other hand sage_setup/docbuild/__init__.py
may not be the right place to check. So at the moment I just want to make sure that on distro where you don't run configure
you get the same result as what you would expect if sage doesn't build pari
but finds it on the system.
comment:7 in reply to: ↑ 3 ; followup: ↓ 8 Changed 18 months ago by
Replying to fbissey:
@Dima just so I don't make a mistake.
''
is the value you get whenpari
is coming from the system?
This is the value I *set*. But you can just unconditionally switch to the appropriate docbuilder in Gentoo.
comment:8 in reply to: ↑ 7 Changed 18 months ago by
Replying to dimpase:
Replying to fbissey:
@Dima just so I don't make a mistake.
''
is the value you get whenpari
is coming from the system?This is the value I *set*. But you can just unconditionally switch to the appropriate docbuilder in Gentoo.
I remarked on that in #28242. This is about having something working out of the box without extra patching or settings. Just using os.environ.get()
already does enable me to build the doc without SAGE_PARI_CFG
being set, which is a progress. I am testing the alternative builder now. Not that I can currently build the doc on Volker's branch because there is a label missing in the doc for manifolds from one of the tickets he is trying to merge.
comment:9 Changed 18 months ago by
 Branch set to u/fbissey/pari_cfg_doc
 Commit set to 27f17ffa52d68349ea978cea1f2acc5c55e52c19
 Dependencies set to 28242
 Status changed from new to needs_review
Last 10 new commits:
b622942  spkgconfigure for pari_elldata

2e11aed  spkgconfigure's for PARI packages

183f47c  check for PARI packages in PARI's spkgconfigure

72f3c20  spkgconfigure for gp2c

6eac550  as pari might become dummy, test with GAP

ac207d5  don't export GP_DATA_DIR, remove other, unneeded GP* vars

317f090  proper dependency resolution (all tests in PARI spkgconfig)

2c26115  docbuild workaround for external PARI

dd2b3fa  redirect gp errors to config.log

27f17ff  Add appropriate fallback if SAGE_PARI_CFG is missing

comment:10 Changed 18 months ago by
 Dependencies changed from 28242 to #28242
comment:11 Changed 18 months ago by
 Reviewers set to Dima Pasechnik
 Status changed from needs_review to positive_review
lgtm
comment:12 Changed 18 months ago by
 Branch changed from u/fbissey/pari_cfg_doc to 27f17ffa52d68349ea978cea1f2acc5c55e52c19
 Resolution set to fixed
 Status changed from positive_review to closed
Will replace
os.environ['SAGE_PARI_CFG']
byos.environ.get('SAGE_PARI_CFG')
insage_setuo/docbuild/__init__.py
.