Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Install the gappy docs if SAGE_SPKG_INSTALL_DOCS=yes
Browse files Browse the repository at this point in the history
Fetches the Python 3 objects.inv from the copy in the Sage sources.
  • Loading branch information
embray committed Feb 26, 2021
1 parent 2be416a commit 45eeb8f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build/pkgs/gappy/dependencies
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(PYTHON) cysignals gap | $(PYTHON_TOOLCHAIN)
$(PYTHON) cysignals gap | $(PYTHON_TOOLCHAIN) sphinx

----------
All lines of this file are ignored except the first.
Expand Down
18 changes: 18 additions & 0 deletions build/pkgs/gappy/spkg-postinst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
if [ "$SAGE_SPKG_INSTALL_DOCS" = "yes" ]; then
cd src/docs/

# write conf.py override to give correct intersphinx mappings
mv conf.py orig_conf.py
cat >> conf.py <<_EOF_
with open('orig_conf.py') as f:
exec(f.read())

intersphinx_mapping.update({
'python': (intersphinx_mapping['python'][0],
'$SAGE_SRC/doc/common/python3.inv')
})
_EOF_

make html
sdh_install _build/html/* "$SAGE_SHARE/doc/gappy"
fi
3 changes: 3 additions & 0 deletions build/pkgs/gappy/spkg-postrm.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if [ -d "$SAGE_SHARE/doc/gappy" ]; then
rm -rf "$SAGE_SHARE/doc/gappy"
fi

0 comments on commit 45eeb8f

Please sign in to comment.