Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sci-mathematics/sage: patches updated. At this stage I don't expect t…
…he documentation to build. Package-Manager: portage-2.2.26
- Loading branch information
Showing
9 changed files
with
880 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff -Naur src.orig/sage/doctest/control.py src/sage/doctest/control.py | ||
--- src.orig/sage/doctest/control.py 2016-02-08 22:12:20.089294214 +1300 | ||
+++ src/sage/doctest/control.py 2016-02-08 22:13:49.935517660 +1300 | ||
@@ -541,11 +541,11 @@ | ||
'sagenb' | ||
""" | ||
opj = os.path.join | ||
- from sage.env import SAGE_SRC, SAGE_ROOT | ||
+ from sage.env import SAGE_SRC, SAGE_DOC, SAGE_ROOT | ||
def all_files(): | ||
from glob import glob | ||
self.files.append(opj(SAGE_SRC, 'sage')) | ||
- self.files.extend(glob(opj(SAGE_SRC, 'doc', '[a-z][a-z]'))) | ||
+ self.files.extend(glob(opj(SAGE_DOC, '[a-z][a-z]'))) | ||
self.options.sagenb = True | ||
DOT_GIT= opj(SAGE_ROOT, '.git') | ||
have_git = os.path.exists(DOT_GIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
diff -Naur src.orig/sage/env.py src/sage/env.py | ||
--- src.orig/sage/env.py 2016-02-08 21:03:30.802138665 +1300 | ||
+++ src/sage/env.py 2016-02-08 21:28:38.713809278 +1300 | ||
@@ -87,26 +87,22 @@ | ||
_add_variable_or_fallback('LOCAL_IDENTIFIER','$HOSTNAME.%s'%os.getpid()) | ||
|
||
# bunch of sage directories and files | ||
-_add_variable_or_fallback('SAGE_ROOT', None) | ||
-_add_variable_or_fallback('SAGE_LOCAL', opj('$SAGE_ROOT', 'local')) | ||
-_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc')) | ||
-_add_variable_or_fallback('SAGE_INC', opj('$SAGE_LOCAL', 'include')) | ||
-_add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share')) | ||
+_add_variable_or_fallback('SAGE_ROOT', opj('@GENTOO_PORTAGE_EPREFIX@/usr', 'share', 'sage')) | ||
+_add_variable_or_fallback('SAGE_LOCAL', opj('@GENTOO_PORTAGE_EPREFIX@/usr') | ||
+_add_variable_or_fallback('SAGE_ETC', opj('@GENTOO_PORTAGE_EPREFIX@/etc')) | ||
+_add_variable_or_fallback('SAGE_INC', opj('@GENTOO_PORTAGE_EPREFIX@/usr/include')) | ||
+_add_variable_or_fallback('SAGE_SHARE', opj('$SAGE_LOCAL', 'share', 'sage')) | ||
|
||
-_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_ROOT', 'src')) | ||
_add_variable_or_fallback('SITE_PACKAGES', site.getsitepackages()) | ||
_add_variable_or_fallback('SAGE_LIB', SITE_PACKAGES[0]) | ||
+_add_variable_or_fallback('SAGE_SRC', opj('$SAGE_LIB')) | ||
|
||
_add_variable_or_fallback('SAGE_CYTHONIZED', opj('$SAGE_SRC', 'build', 'cythonized')) | ||
|
||
-_add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext')) | ||
-_add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs')) | ||
-_add_variable_or_fallback('SAGE_SPKG_INST', opj('$SAGE_LOCAL', 'var', 'lib', 'sage', 'installed')) | ||
-_add_variable_or_fallback('SAGE_DOC', opj('$SAGE_SRC', 'doc')) | ||
-_add_variable_or_fallback('SAGE_DOC_OUTPUT', opj('$SAGE_DOC', 'output')) | ||
+_add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'ext')) | ||
+_add_variable_or_fallback('SAGE_DOC', opj('$SAGE_LOCAL', 'share', 'doc', 'sage')) | ||
+_add_variable_or_fallback('SAGE_DOC_OUTPUT', opj('$SAGE_DOC')) | ||
_add_variable_or_fallback('DOT_SAGE', opj(os.environ.get('HOME','$SAGE_ROOT'), '.sage')) | ||
-_add_variable_or_fallback('SAGE_DOT_GIT', opj('$SAGE_ROOT', '.git')) | ||
-_add_variable_or_fallback('SAGE_DISTFILES', opj('$SAGE_ROOT', 'upstream')) | ||
|
||
# misc | ||
_add_variable_or_fallback('SAGE_URL', 'http://sage.math.washington.edu/sage/') | ||
@@ -135,7 +131,6 @@ | ||
print("permissions to before you start sage.") | ||
|
||
# things that need DOT_SAGE | ||
-_add_variable_or_fallback('PYTHON_EGG_CACHE', opj('$DOT_SAGE', '.python-eggs')) | ||
_add_variable_or_fallback('SAGE_STARTUP_FILE', opj('$DOT_SAGE', 'init.sage')) | ||
|
||
# delete temporary variables used for setting up sage.env |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
diff -Naur src.orig/sage_setup/docbuild/build_options.py src/sage_setup/docbuild/build_options.py | ||
--- src.orig/sage_setup/docbuild/build_options.py 2016-02-08 22:32:28.710300114 +1300 | ||
+++ src/sage_setup/docbuild/build_options.py 2016-02-08 22:35:04.805687370 +1300 | ||
@@ -4,9 +4,20 @@ | ||
|
||
import os, re | ||
|
||
-from sage.env import SAGE_DOC, SAGE_DOC_OUTPUT | ||
+from sage.env import SAGE_DOC | ||
+ | ||
+LANGUAGESLIST = [d for d in os.listdir(SAGE_DOC) if re.match('^[a-z][a-z]$', d)] | ||
+try: | ||
+ DESIRED_LANGUAGES = list(set((os.environ['LANGUAGES']).split())) | ||
+except KeyError: | ||
+ DESIRED_LANGUAGES = LANGUAGELIST | ||
+LANGUAGES = [] | ||
+for d in DESIRED_LANGUAGES: | ||
+ if d in LANGUAGELIST: | ||
+ LANGUAGES.append(d) | ||
+if not LANGUAGES: | ||
+ LANGUAGES=LANGUAGELIST | ||
|
||
-LANGUAGES = [d for d in os.listdir(SAGE_DOC) if re.match('^[a-z][a-z]$', d)] | ||
SPHINXOPTS = "" | ||
PAPER = "" | ||
OMIT = ["introspect"] # docs/dirs to omit when listing and building 'all' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
diff -Naur src.orig/sage/misc/sagedoc.py src/sage/misc/sagedoc.py | ||
--- src.orig/sage/misc/sagedoc.py 2016-02-08 22:17:58.966137012 +1300 | ||
+++ src/sage/misc/sagedoc.py 2016-02-08 22:28:43.595740239 +1300 | ||
@@ -18,8 +18,8 @@ | ||
Check that argspecs of extension function/methods appear correctly, | ||
see :trac:`12849`:: | ||
|
||
- sage: from sage.env import SAGE_DOC_OUTPUT | ||
- sage: docfilename = os.path.join(SAGE_DOC_OUTPUT, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html') | ||
+ sage: from sage.env import SAGE_DOC | ||
+ sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html') | ||
sage: for line in open(docfilename): | ||
....: if "#sage.symbolic.expression.Expression.N" in line: | ||
....: print line | ||
@@ -40,7 +40,7 @@ | ||
from sage.misc.viewer import browser | ||
from sage.misc.temporary_file import tmp_dir | ||
import sage.version | ||
-from sage.env import SAGE_DOC, SAGE_DOC_OUTPUT, SAGE_SRC | ||
+from sage.env import SAGE_DOC, SAGE_DOC, SAGE_SRC | ||
|
||
# The detex function does two kinds of substitutions: math, which | ||
# should only be done on the command line -- in the notebook, these | ||
@@ -800,7 +800,7 @@ | ||
module = '' | ||
exts = ['html'] | ||
title = 'Documentation' | ||
- base_path = SAGE_DOC_OUTPUT | ||
+ base_path = SAGE_DOC | ||
doc_path = SAGE_DOC | ||
|
||
from sage_setup.docbuild.build_options import LANGUAGES, OMIT | ||
@@ -819,9 +819,9 @@ | ||
# Check to see if any documents are missing. This just | ||
# checks to see if the appropriate output directory exists, | ||
# not that it contains a complete build of the docs. | ||
- missing = [os.path.join(SAGE_DOC_OUTPUT, 'html', doc) | ||
+ missing = [os.path.join(SAGE_DOC, 'html', doc) | ||
for doc in documents if not | ||
- os.path.exists(os.path.join(SAGE_DOC_OUTPUT, 'html', doc))] | ||
+ os.path.exists(os.path.join(SAGE_DOC, 'html', doc))] | ||
num_missing = len(missing) | ||
if num_missing > 0: | ||
print("""Warning, the following Sage documentation hasn't been built, | ||
@@ -1102,7 +1102,7 @@ | ||
search is case-insensitive by default. | ||
|
||
The file paths in the output are relative to | ||
- ``$SAGE_DOC_OUTPUT``. | ||
+ ``$SAGE_DOC``. | ||
|
||
INPUT: same as for :func:`search_src`. | ||
|
||
@@ -1309,7 +1309,7 @@ | ||
'http://localhost:8000/doc/live/' | ||
""" | ||
self._base_url = "http://localhost:8000/doc/live/" | ||
- self._base_path = os.path.join(SAGE_DOC_OUTPUT, "html", "en") | ||
+ self._base_path = os.path.join(SAGE_DOC, "html", "en") | ||
|
||
def __call__(self, obj, output='html', view=True): | ||
r""" | ||
@@ -1376,7 +1376,7 @@ | ||
path = os.path.join(tmp_dir(), "temp.html") | ||
filed = open(path, 'w') | ||
|
||
- static_path = os.path.join(SAGE_DOC_OUTPUT, "html", "en", "_static") | ||
+ static_path = os.path.join(SAGE_DOC, "html", "en", "_static") | ||
if os.path.exists(static_path): | ||
title = obj_name + ' - Sage ' + sage.version.version + ' Documentation' | ||
template = """<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | ||
@@ -1463,7 +1463,7 @@ | ||
sage: browse_sage_doc._open("reference", testing=True)[0] | ||
'http://localhost:8000/doc/live/reference/index.html' | ||
sage: browse_sage_doc._open("tutorial", testing=True)[1] | ||
- '...doc/output/html/en/tutorial/index.html' | ||
+ '.../html/en/tutorial/index.html' | ||
""" | ||
url = self._base_url + os.path.join(name, "index.html") | ||
path = os.path.join(self._base_path, name, "index.html") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
diff -Naur src.orig/sage/doctest/control.py src/sage/doctest/control.py | ||
--- src.orig/sage/doctest/control.py 2016-02-05 12:56:01.335192754 +1300 | ||
+++ src/sage/doctest/control.py 2016-02-05 12:57:01.572345296 +1300 | ||
@@ -545,7 +545,6 @@ | ||
def all_files(): | ||
from glob import glob | ||
self.files.append(opj(SAGE_SRC, 'sage')) | ||
- self.files.append(opj(SAGE_SRC, 'sage_setup')) | ||
self.files.extend(glob(opj(SAGE_SRC, 'doc', '[a-z][a-z]'))) | ||
self.options.sagenb = True | ||
DOT_GIT= opj(SAGE_ROOT, '.git') | ||
diff -Naur src.orig/sage/doctest/sources.py src/sage/doctest/sources.py | ||
--- src.orig/sage/doctest/sources.py 2016-02-05 12:56:01.335192754 +1300 | ||
+++ src/sage/doctest/sources.py 2016-02-05 12:56:37.285283793 +1300 | ||
@@ -27,7 +27,7 @@ | ||
from parsing import SageDocTestParser | ||
from util import NestedName | ||
from sage.structure.dynamic_class import dynamic_class | ||
-from sage.env import SAGE_SRC, SAGE_LOCAL | ||
+from sage.env import SAGE_SRC, SAGE_LOCAL, SAGE_LIB | ||
|
||
# Python file parsing | ||
triple_quotes = re.compile("\s*[rRuU]*((''')|(\"\"\"))") | ||
@@ -80,7 +80,7 @@ | ||
# If the file is in the sage library, we can use our knowledge of | ||
# the directory structure | ||
dev = SAGE_SRC | ||
- sp = os.path.join(SAGE_LOCAL, 'lib', 'python', 'site-packages') | ||
+ sp = SAGE_LIB | ||
if path.startswith(dev): | ||
# there will be a branch name | ||
i = path.find(os.path.sep, len(dev)) | ||
diff -Naur src.orig/sage_setup/find.py src/sage_setup/find.py | ||
--- src.orig/sage_setup/find.py 2016-02-05 12:56:01.419192966 +1300 | ||
+++ src/sage_setup/find.py 2016-02-05 12:56:37.285283793 +1300 | ||
@@ -116,7 +116,7 @@ | ||
cydir = os.path.join(cythonized_dir, dir) | ||
|
||
files = [os.path.join(sdir, f) for f in os.listdir(sdir) | ||
- if f.endswith((".pxd", ".pxi")) or f in special_filenames] | ||
+ if f.endswith((".pxd", ".pxi", ".pyx", ".rst")) or f in special_filenames] | ||
if os.path.isdir(cydir): # Not every directory contains Cython files | ||
files += [os.path.join(cydir, f) for f in os.listdir(cydir) | ||
if f.endswith(".h")] | ||
diff -Naur src.orig/setup.py src/setup.py | ||
--- src.orig/setup.py 2016-02-05 12:56:01.419192966 +1300 | ||
+++ src/setup.py 2016-02-05 12:56:37.285283793 +1300 | ||
@@ -613,28 +613,13 @@ | ||
t = time.time() | ||
from sage_setup.find import find_python_sources, find_extra_files | ||
python_packages, python_modules = find_python_sources( | ||
- SAGE_SRC, ['sage', 'sage_setup']) | ||
+ SAGE_SRC, ['sage']) | ||
python_data_files = find_extra_files(python_packages, | ||
".", SAGE_CYTHONIZED, SAGE_LIB, ["ntlwrap.cpp"]) | ||
print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t)) | ||
|
||
|
||
######################################################### | ||
-### Clean | ||
-######################################################### | ||
- | ||
-print('Cleaning up stale installed files....') | ||
-t = time.time() | ||
-from sage_setup.clean import clean_install_dir | ||
-output_dirs = SITE_PACKAGES + glob.glob(os.path.join(SAGE_SRC, 'build', 'lib*')) | ||
-for output_dir in output_dirs: | ||
- print('- cleaning {0}'.format(output_dir)) | ||
- clean_install_dir(output_dir, python_packages, python_modules, | ||
- ext_modules, python_data_files) | ||
-print('Finished cleaning, time: %.2f seconds.' % (time.time() - t)) | ||
- | ||
- | ||
-######################################################### | ||
### Install also Jupyter kernel spec | ||
######################################################### | ||
|
Oops, something went wrong.