Changes between Initial Version and Version 8 of Ticket #21732


Ignore:
Timestamp:
10/20/16 17:34:23 (3 years ago)
Author:
infinity0
Comment:

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

Legend:

Unmodified
Added
Removed
Modified
  • 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:
    22
    3 I think it would be cleaner, both for Debian as well as Sage upstream, to move the following files like this:
     3{{{
     4$ git grep SAGE_DOC_SRC -- src/sage
     5[..]
     6src/sage/misc/sagedoc.py:    sys.path = [os.path.join(SAGE_DOC_SRC, 'common')] + oldpath
     7[..]
     8src/sage/misc/sphinxify.py:    confdir = os.path.join(SAGE_DOC_SRC, 'en', 'introspect')
     9}}}
     10
     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.
     12
     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.
     14
     15This ticket proposes the following change (or something similar)
    416
    517- src/doc/common/* -> src/sage/doc/common/*
    618- src/doc/en/introspect/* -> src/sage/doc/introspect/*
    719
    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/build_options.py.
     20
     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.
     22
     23One could also remove the `OMIT = ["introspect"]` exception in src/sage_setup/docbuild/build_options.py.
    924
    1025Does this sound sensible? If so I can do this for our Debian packaging already, test it, and send in an initial patch.