#28341 closed defect (fixed)

Allow doc to build with SAGE_PARI_CFG undefined

Reported by: fbissey Owned by:
Priority: major Milestone: sage-8.9
Component: distribution Keywords:
Cc: dimpase, gh-timokau 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 fbissey

Will replace os.environ['SAGE_PARI_CFG'] by os.environ.get('SAGE_PARI_CFG') in sage_setuo/docbuild/__init__.py.

Last edited 18 months ago by fbissey (previous) (diff)

comment:2 Changed 18 months ago by dimpase

  • Cc dimpase added

comment:3 follow-up: Changed 18 months ago by fbissey

@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 gh-timokau

  • Cc gh-timokau added

comment:5 follow-up: Changed 18 months ago by 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/spkg-configure.m4?id=46772dbb31f2be940bda299136455f495c6a21dc

comment:6 in reply to: ↑ 5 Changed 18 months ago by fbissey

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/spkg-configure.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 ; follow-up: Changed 18 months ago by dimpase

Replying to fbissey:

@Dima just so I don't make a mistake. '' is the value you get when pari 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 fbissey

Replying to dimpase:

Replying to fbissey:

@Dima just so I don't make a mistake. '' is the value you get when pari 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 fbissey

  • Authors set to François Bissey
  • 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:

b622942spkg-configure for pari_elldata
2e11aedspkg-configure's for PARI packages
183f47ccheck for PARI packages in PARI's spkg-configure
72f3c20spkg-configure for gp2c
6eac550as pari might become dummy, test with GAP
ac207d5don't export GP_DATA_DIR, remove other, unneeded GP* vars
317f090proper dependency resolution (all tests in PARI spkg-config)
2c26115docbuild workaround for external PARI
dd2b3faredirect gp errors to config.log
27f17ffAdd appropriate fallback if SAGE_PARI_CFG is missing

comment:10 Changed 18 months ago by dimpase

  • Dependencies changed from 28242 to #28242

comment:11 Changed 18 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

lgtm

comment:12 Changed 18 months ago by vbraun

  • Branch changed from u/fbissey/pari_cfg_doc to 27f17ffa52d68349ea978cea1f2acc5c55e52c19
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.