Changes between Initial Version and Version 8 of Ticket #21732
- Timestamp:
- Oct 20, 2016, 5:34:23 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #21732
-
Property
Summary
changed from
Move runtime documentation python modules into sagelib
toMove runtime documentation python modules into src/sage
-
Property
Summary
changed from
-
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. 1 Currently, (1) at runtime sage requires some files from under SAGE_DOC_SRC. For example: 2 2 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 [..] 6 src/sage/misc/sagedoc.py: sys.path = [os.path.join(SAGE_DOC_SRC, 'common')] + oldpath 7 [..] 8 src/sage/misc/sphinxify.py: confdir = os.path.join(SAGE_DOC_SRC, 'en', 'introspect') 9 }}} 10 11 However, 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 13 In 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 15 This ticket proposes the following change (or something similar) 4 16 5 17 - src/doc/common/* -> src/sage/doc/common/* 6 18 - src/doc/en/introspect/* -> src/sage/doc/introspect/* 7 19 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 21 This 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 23 One could also remove the `OMIT = ["introspect"]` exception in src/sage_setup/docbuild/build_options.py. 9 24 10 25 Does this sound sensible? If so I can do this for our Debian packaging already, test it, and send in an initial patch.