Changes between Initial Version and Version 8 of Ticket #21732

Oct 20, 2016, 5:34:23 PM (6 years ago)
Ximin Luo

Alright, sorry, I'll take some more time writing future tickets. I've edited the description now, hopefully it's OK.


  • Ticket #21732

    • Property Summary changed from Move runtime documentation python modules into sagelib to Move runtime documentation python modules into src/sage
  • Ticket #21732 – Description

    initial v8  
    1 This would make life easier for binary distros. At the moment we (Debian) don't install SAGE_SRC or SAGE_DOC_SRC anywhere, but some (but not all) of the files here are needed at runtime for functionality such as '?'-suffix syntax.
     1Currently, (1) at runtime sage requires some files from under SAGE_DOC_SRC. For example:
    3 I think it would be cleaner, both for Debian as well as Sage upstream, to move the following files like this:
     4$ git grep SAGE_DOC_SRC -- src/sage
     6src/sage/misc/    sys.path = [os.path.join(SAGE_DOC_SRC, 'common')] + oldpath
     8src/sage/misc/    confdir = os.path.join(SAGE_DOC_SRC, 'en', 'introspect')
     11However, this is awkward for binary distros such as Debian, who don't install source code onto end user machines by default. Indeed, even Sage's own Makefiles don't install these files into SAGE_LOCAL, even though they are a runtime necessity.
     13In addition to this, (2) there are many cases where Sage tracks SAGE_DOC_SRC and hacks it into `sys.path` via `os.environ`, which is not very clean.
     15This ticket proposes the following change (or something similar)
    517- src/doc/common/* -> src/sage/doc/common/*
    618- src/doc/en/introspect/* -> src/sage/doc/introspect/*
    8 This would also allow you to remove the sys.path and os.environ hacks that are currently in place everywhere, as well as to remove the `OMIT = ["introspect"]` exception in src/sage_setup/docbuild/
     21This would solve the above two issues - instead of (2) one can just do `from sage.doc.common import conf` or `from sage.doc.introspect import conf`, and (1) is taken care of automatically because everything under `src/sage` is installed as standard python modules.
     23One could also remove the `OMIT = ["introspect"]` exception in src/sage_setup/docbuild/
    1025Does this sound sensible? If so I can do this for our Debian packaging already, test it, and send in an initial patch.