[sagemath] 03/13: Refresh u* patches for sagemath 8.1.beta7.
Tobias Hansen
thansen at moszumanska.debian.org
Sun Oct 15 19:18:56 UTC 2017
This is an automated email from the git hooks/post-receive script.
thansen pushed a commit to branch master
in repository sagemath.
commit af623e28f966444f1771fd722c17ac70e9f4742c
Author: Tobias Hansen <thansen at debian.org>
Date: Sun Oct 15 10:47:31 2017 +0000
Refresh u* patches for sagemath 8.1.beta7.
---
debian/changelog | 11 +-
debian/patches/series | 6 -
debian/patches/u0-version-cython-0.26.patch | 31 --
debian/patches/u0-version-scipy-0.19.1.patch | 366 ---------------------
debian/patches/u0-version-sphinx-1.6.patch | 186 -----------
debian/patches/u1-fix-dont-require-DISPLAY.patch | 2 +-
debian/patches/u1-looser-doctest-basename.patch | 2 +-
debian/patches/u1-more-sphinx-1.5-fixes.patch | 19 --
debian/patches/u1-pip-nowarn.patch | 19 --
debian/patches/u1-scripts-dir.patch | 18 +-
debian/patches/u2-allow-override-sage-local.patch | 13 +-
.../patches/u2-better-sphinx-failure-modes.patch | 8 +-
.../patches/u2-fix-less-trivial-test-cases.patch | 21 --
debian/patches/u2-fix-trivial-test-cases.patch | 4 +-
debian/patches/u2-pari-stackwarn.patch | 4 +-
15 files changed, 31 insertions(+), 679 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 214fdf6..713ea87 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,15 @@
sagemath (8.1~beta7-1) UNRELEASED; urgency=medium
* New upstream version.
+ * Remove patches (applied upstream):
+ - u0-version-cython-0.26.patch #23360
+ - u0-version-scipy-0.19.1.patch #23594
+ - u0-version-sphinx-1.6.patch #23023
+ - u1-pip-nowarn.patch #21835
+ - u1-more-sphinx-1.5-fixes.patch #23364
+ - u2-fix-less-trivial-test-cases.patch
+ * Patches with non-trivial modifications:
+ - u2-allow-override-sage-local.patch
-- Tobias Hansen <thansen at debian.org> Sun, 15 Oct 2017 10:23:00 +0000
@@ -20,7 +29,7 @@ sagemath (8.0-8) unstable; urgency=medium
-- Tobias Hansen <thansen at debian.org> Wed, 20 Sep 2017 07:18:46 +0000
sagemath (8.0-7) unstable; urgency=medium
-
+
* Add patch u0-version-scipy-0.19.1.patch from upstream.
* Remove parts of u2-fix-less-trivial-test-cases.patch which are
included in u0-version-scipy-0.19.1.patch.
diff --git a/debian/patches/series b/debian/patches/series
index dba9718..54b82fe 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,20 +1,15 @@
# Patches already applied upstream or committed in a side branch
# Or nearly-finished patches that they'll very probably merge.
-u0-version-cython-0.26.patch #23360
-u0-version-scipy-0.19.1.patch #23594
-u0-version-sphinx-1.6.patch #23023
# Patches that have open upstream tickets
u1-version-pbori-boost1.62-hashes.patch #22243
u1-fix-dont-require-DISPLAY.patch #22441
-u1-pip-nowarn.patch #21835
u1-fix-atrocious-symlink-logic.patch #22444
u1-looser-doctest-basename.patch #22445
u1-scripts-dir.patch #22731
# Not yet in Debian, uncomment when it is:
#u1-version-ipython-5.4.patch #23125
u1-ipywidgets-repr.patch #https://github.com/jupyter-widgets/ipywidgets/pull/1031
-u1-more-sphinx-1.5-fixes.patch #23364
u1-version-giac-1.2.3.57.patch #TODO
# Patches that should be upstreamed (may need some work first)
@@ -22,7 +17,6 @@ u2-pari-stackwarn.patch #23263
u2-version-cddlib-094h.patch
u2-reproducible-docs.patch
u2-fix-trivial-test-cases.patch
-u2-fix-less-trivial-test-cases.patch
u2-fix-sympow-cachedir.patch
u2-allow-override-sage-local.patch
u2-workaround-sympow-malloc-perturb.patch
diff --git a/debian/patches/u0-version-cython-0.26.patch b/debian/patches/u0-version-cython-0.26.patch
deleted file mode 100644
index cacc3e9..0000000
--- a/debian/patches/u0-version-cython-0.26.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 44030be5598fe725d747dd4abe3a664da37e37f2 Mon Sep 17 00:00:00 2001
-From: Jeroen Demeyer <jdemeyer at cage.ugent.be>
-Date: Tue, 4 Jul 2017 10:33:00 +0200
-Subject: Upgrade to Cython 0.26
-
-Bug: https://trac.sagemath.org/ticket/23360
-
---- a/sage/src/setup.py
-+++ b/sage/src/setup.py
-@@ -95,7 +95,12 @@
-
- # Manually add -fno-strict-aliasing, which is needed to compile Cython
- # and disappears from the default flags if the user has set CFLAGS.
--extra_compile_args = [ "-fno-strict-aliasing" ]
-+#
-+# Add -DCYTHON_CLINE_IN_TRACEBACK=1 which causes the .c line number to
-+# always appear in exception tracebacks (by default, this is a runtime
-+# setting in Cython which causes some overhead every time an exception
-+# is raised).
-+extra_compile_args = ["-fno-strict-aliasing", "-DCYTHON_CLINE_IN_TRACEBACK=1"]
- extra_link_args = [ ]
-
- DEVEL = False
-@@ -336,6 +341,7 @@
-
- # Cython compiler directives
- self.cython_directives = dict(
-+ auto_pickle=False,
- autotestdict=False,
- cdivision=True,
- embedsignature=True,
diff --git a/debian/patches/u0-version-scipy-0.19.1.patch b/debian/patches/u0-version-scipy-0.19.1.patch
deleted file mode 100644
index baf5d9a..0000000
--- a/debian/patches/u0-version-scipy-0.19.1.patch
+++ /dev/null
@@ -1,366 +0,0 @@
-Bug: https://trac.sagemath.org/ticket/23594
-
-From 49485cde0a359147ac75ec5b887a6595d22e3bb0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Tue, 8 Aug 2017 11:58:24 +1200
-Subject: Fixing easy to fix doctests
-
----
- src/doc/en/installation/source.rst | 8 ++++++++
- src/sage/coding/code_bounds.py | 2 +-
- src/sage/functions/exp_integral.py | 2 +-
- src/sage/matrix/matrix_double_dense.pyx | 4 ++--
- 4 files changed, 12 insertions(+), 4 deletions(-)
-
-From 7c600a76e9003ead3ccfe7377a56a6b6dfb51ce5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Tue, 8 Aug 2017 13:50:42 +1200
-Subject: Fix optimize doctest after checking that it still does what it
- supposed to do. Results are more consistent between methods overall.
-
----
- src/sage/numerical/optimize.py | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-From cbe2690f4b4fa7bbb6cca1d263be5d90ea69f9e4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Mon, 21 Aug 2017 11:24:31 +1200
-Subject: Use tolerance as much as possible in minimize
-
----
- src/sage/numerical/optimize.py | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-From 5cb42f1b8e0d6daf45078586e19a7cded50c2d9b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Mon, 21 Aug 2017 11:45:06 +1200
-Subject: remove documentation changes meant for another ticket
-
----
- src/doc/en/installation/source.rst | 8 --------
- 1 file changed, 8 deletions(-)
-
-From 88d70c68fbd6ba1fda52217b81a45c906aaf390e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Mon, 28 Aug 2017 14:30:11 +1200
-Subject: Remove references to weave now that it is gone from scipy.
-
----
- .../numerical_sage/comparison_to_cython.rst | 4 +-
- .../thematic_tutorials/numerical_sage/ctypes.rst | 8 +-
- .../numerical_sage/parallel_laplace_solver.rst | 5 +-
- .../using_compiled_code_iteractively.rst | 8 +-
- .../en/thematic_tutorials/numerical_sage/weave.rst | 150 ---------------------
- 5 files changed, 11 insertions(+), 164 deletions(-)
- delete mode 100644 src/doc/en/thematic_tutorials/numerical_sage/weave.rst
-
---- a/sage/src/sage/coding/code_bounds.py
-+++ b/sage/src/sage/coding/code_bounds.py
-@@ -627,7 +627,7 @@
-
- sage: from sage.coding.code_bounds import entropy_inverse
- sage: entropy_inverse(0.1)
-- 0.012986862055848683
-+ 0.012986862055...
- sage: entropy_inverse(1)
- 1/2
- sage: entropy_inverse(0, 3)
---- a/sage/src/sage/functions/exp_integral.py
-+++ b/sage/src/sage/functions/exp_integral.py
-@@ -1170,7 +1170,7 @@
-
- sage: f(x) = cosh_integral(x)
- sage: find_root(f, 0.1, 1.0)
-- 0.523822571389482...
-+ 0.523822571389...
-
- Compare ``cosh_integral(3.0)`` to the definition of the value using
- numerical integration::
---- a/sage/src/sage/matrix/matrix_double_dense.pyx
-+++ b/sage/src/sage/matrix/matrix_double_dense.pyx
-@@ -1701,7 +1701,7 @@
- sage: A.solve_right(b)
- Traceback (most recent call last):
- ...
-- LinAlgError: singular matrix
-+ LinAlgError: Matrix is singular.
-
- The vector of constants needs the correct degree. ::
-
-@@ -1841,7 +1841,7 @@
- sage: A.solve_left(b)
- Traceback (most recent call last):
- ...
-- LinAlgError: singular matrix
-+ LinAlgError: Matrix is singular.
-
- The vector of constants needs the correct degree. ::
-
---- a/sage/src/sage/numerical/optimize.py
-+++ b/sage/src/sage/numerical/optimize.py
-@@ -289,14 +289,14 @@
-
- sage: vars = var('x y z')
- sage: f = 100*(y-x^2)^2+(1-x)^2+100*(z-y^2)^2+(1-y)^2
-- sage: minimize(f, [.1,.3,.4])
-- (1.00..., 1.00..., 1.00...)
-+ sage: minimize(f, [.1,.3,.4]) # abs tol 1e-6
-+ (1.0, 1.0, 1.0)
-
- Try the newton-conjugate gradient method; the gradient and hessian are
- computed automatically::
-
-- sage: minimize(f, [.1, .3, .4], algorithm="ncg")
-- (0.9999999..., 0.999999..., 0.999999...)
-+ sage: minimize(f, [.1, .3, .4], algorithm="ncg") # abs tol 1e-6
-+ (1.0, 1.0, 1.0)
-
- We get additional convergence information with the `verbose` option::
-
-@@ -309,8 +309,8 @@
-
- sage: def rosen(x): # The Rosenbrock function
- ....: return sum(100.0r*(x[1r:]-x[:-1r]**2.0r)**2.0r + (1r-x[:-1r])**2.0r)
-- sage: minimize(rosen, [.1,.3,.4])
-- (1.00..., 1.00..., 1.00...)
-+ sage: minimize(rosen, [.1,.3,.4]) # abs tol 3e-5
-+ (1.0, 1.0, 1.0)
-
- Same example with a pure Python function and a Python function to
- compute the gradient::
-@@ -328,8 +328,8 @@
- ....: der[0] = -400r*x[0r]*(x[1r]-x[0r]**2r) - 2r*(1r-x[0])
- ....: der[-1] = 200r*(x[-1r]-x[-2r]**2r)
- ....: return der
-- sage: minimize(rosen, [.1,.3,.4], gradient=rosen_der, algorithm="bfgs")
-- (1.00..., 1.00..., 1.00...)
-+ sage: minimize(rosen, [.1,.3,.4], gradient=rosen_der, algorithm="bfgs") # abs tol 1e-6
-+ (1.0, 1.0, 1.0)
- """
- from sage.symbolic.expression import Expression
- from sage.ext.fast_eval import fast_callable
---- a/sage/src/doc/en/thematic_tutorials/numerical_sage/comparison_to_cython.rst
-+++ b/sage/src/doc/en/thematic_tutorials/numerical_sage/comparison_to_cython.rst
-@@ -7,8 +7,8 @@
- website you can find an example. One potential downside to Cython over
- the previous solutions is it requires the user to understand how NumPy
- arrays or Sage matrices are implemented so as to be able to access
--their internal data. In contrast the weave, scipy, and ctypes examples
--only require the user to know C or Fortran and from their perspective
-+their internal data. In contrast the scipy, and ctypes examples only
-+require the user to know C or Fortran and from their perspective
- the NumPy data magically gets passed to C or Fortran with no further
- thought from them. In order for pyrex to be competitive as a way to
- interactively write compiled code, the task of accessing the internal
---- a/sage/src/doc/en/thematic_tutorials/numerical_sage/ctypes.rst
-+++ b/sage/src/doc/en/thematic_tutorials/numerical_sage/ctypes.rst
-@@ -199,8 +199,8 @@
- double. By default ctypes assumes the return values are ints. If
- they are not you need to tell it by setting restype to the correct
- return type. If you execute the above code, then solve(u) will
--solve the system. It is comparable to the weave or fortran
--solutions taking around .2 seconds. Alternatively you could do
-+solve the system. It is comparable to the fortran solution taking
-+around .2 seconds. Alternatively you could do
-
- ::
-
-@@ -209,8 +209,8 @@
- laplace.solve_in_C(n.ctypes.data_as(c_void_p),n,n,dx,dx)
-
- which computes the solution entirely in C. This is very fast.
--Admittedly we could have had our fortran or weave routines do the
--entire solution at the C/Fortran level and we would have the same
-+Admittedly we could have had our fortran routines do the
-+entire solution at the Fortran level and we would have the same
- speed.
-
- As I said earlier you can just as easily call a shared object
---- a/sage/src/doc/en/thematic_tutorials/numerical_sage/parallel_laplace_solver.rst
-+++ b/sage/src/doc/en/thematic_tutorials/numerical_sage/parallel_laplace_solver.rst
-@@ -126,6 +126,5 @@
- takes only 6 seconds while the serial version we wrote earlier
- takes 20 seconds.
-
--Excercise: Rewrite the above using f2py or weave, so that each
--process compiles a fortran or C timestep function and uses that,
--how fast can you get this?
-+Excercise: Rewrite the above using f2py, so that each process
-+compiles a fortran function and uses that, how fast can you get this?
---- a/sage/src/doc/en/thematic_tutorials/numerical_sage/using_compiled_code_iteractively.rst
-+++ b/sage/src/doc/en/thematic_tutorials/numerical_sage/using_compiled_code_iteractively.rst
-@@ -6,10 +6,9 @@
- general. The exception is that these notes assume you are using Sage's
- interface to f2py which makes it more convenient to work with f2py
- interactively. You should look at the f2py website for information on
--using the command line f2py tool. The ctypes and weave example will
--work in any recent Python install (weave is not part of Python so you
--will have to install it separately). If you are using Sage then weave,
--ctypes, and f2py are all there already.
-+using the command line f2py tool. The ctypes example will work in any
-+recent Python install. If you are using Sage, then ctypes and f2py are
-+all there already.
-
- Firstly why would we want to write compiled code? Obviously, because
- its fast, far faster than interpreted Python code. Sage has very
-@@ -44,7 +43,6 @@
-
- f2py
- f2py_examples
-- weave
- ctypes
- ctypes_examples
- comparison_to_cython
---- a/sage/src/doc/en/thematic_tutorials/numerical_sage/weave.rst
-+++ /dev/null
-@@ -1,150 +0,0 @@
--Weave
--=====
--
--Weave is a tool that does for C/C++ what f2py does for fortran
--(though we should note it is also possible to wrap C code using
--f2py). Suppose we have some data stored in numpy arrays and we want
--to write some C/C++ code to do something with that data that needs
--to be fast. For a trivial example, let us write a function that
--sums the contents of a numpy array
--
--::
--
-- sage: from scipy import weave
-- doctest:...: DeprecationWarning: `scipy.weave` is deprecated, use `weave` instead!
-- sage: from scipy.weave import converters
--
--::
--
-- def my_sum(a):
-- n=int(len(a))
-- code="""
-- int i;
-- long int counter;
-- counter =0;
-- for(i=0;i<n;i++)
-- {
-- counter=counter+a(i);
-- }
-- return_val=counter;
-- """
--
-- err=weave.inline(code,['a','n'],type_converters=converters.blitz,compiler='gcc')
-- return err
--
--To call this function do ::
--
-- import numpy
-- a = numpy.array(range(60000))
-- time my_sum(a)
-- time sum(range(60000))
--
--The first time the weave code executes the code is compiled, from
--then on, the execution is immediate. You should find that python's
--built-in sum function is comparable in speed to what we just wrote.
--Let us explain some things about this example. As you can see, to
--use weave you create a string containing pure C/C++ code. Then you
--call weave.inline on it. You pass to weave the string with the
--code, as well as a list of python object that it is to
--automatically convert to C variables. So in our case we can refer
--to the python objects :math:`a` and :math:`n` inside of weave.
--Numpy arrays are accessed by :math:`a(i)` if they are
--one-dimensional or :math:`a(i,j)` if they are two dimensional. Of
--course we cannot use just any python object, currently weave knows
--about all python numerical data types such as ints and floats, as
--well as numpy arrays. Note that numpy arrays do not become pointers
--in the C code (which is why they are accessed by ( ) and not [ ].
--If you need a pointer you should copy the data into a pointer. Next
--is a more complicated example that calls lapack to solve a linear
--system ax=b.
--
--::
--
-- def weave_solve(a,b):
-- n = len(a[0])
-- x = numpy.array([0]*n,dtype=float)
--
-- support_code="""
-- #include <stdio.h>
-- extern "C" {
-- void dgesv_(int *size, int *flag,double* data,int*size,
-- int*perm,double*vec,int*size,int*ok);
-- }
-- """
--
-- code="""
-- int i,j;
-- double* a_c;
-- double* b_c;
-- int size;
-- int flag;
-- int* p;
-- int ok;
-- size=n;
-- flag=1;
-- a_c= (double *)malloc(sizeof(double)*n*n);
-- b_c= (double *)malloc(sizeof(double)*n);
-- p = (int*)malloc(sizeof(int)*n);
-- for(i=0;i<n;i++)
-- {
-- b_c[i]=b(i);
-- for(j=0;j<n;j++)
-- a_c[i*n+j]=a(i,j);
-- }
-- dgesv_(&size,&flag,a_c,&size,p,b_c,&size,&ok);
-- for(i=0;i<n;i++)
-- x(i)=b_c[i];
-- free(a_c);
-- free(b_c);
-- free(p);
-- """
--
-- libs=['lapack','blas','g2c']
-- dirs=['/media/sdb1/sage-2.6.linux32bit-i686-Linux']
-- vars = ['a','b','x','n']
-- weave.inline(code,vars,support_code=support_code,libraries=libs,library_dirs=dirs, \
-- type_converters=converters.blitz,compiler='gcc')
-- return x
--
--
--Note that we have used the support_code argument which is additional C code you can
--use to include headers and declare functions. Note that inline also can take all distutils
--compiler options which we used here to link in lapack.
--
--::
--
-- def weaveTimeStep(u,dx,dy):
-- """Takes a time step using inlined C code -- this version uses
-- blitz arrays."""
-- nx, ny = u.shape
-- dx2, dy2 = dx**2, dy**2
-- dnr_inv = 0.5/(dx2 + dy2)
--
-- code = """
-- double tmp, err, diff,dnr_inv_;
-- dnr_inv_=dnr_inv;
-- err = 0.0;
-- for (int i=1; i<nx-1; ++i) {
-- for (int j=1; j<ny-1; ++j) {
-- tmp = u(i,j);
-- u(i,j) = ((u(i-1,j) + u(i+1,j))*dy2 +
-- (u(i,j-1) + u(i,j+1))*dx2)*dnr_inv_;
-- diff = u(i,j) - tmp;
-- err += diff*diff;
-- }
-- }
-- return_val = sqrt(err);
-- """
-- # compiler keyword only needed on windows with MSVC installed
-- err = weave.inline(code, ['u', 'dx2', 'dy2', 'dnr_inv', 'nx','ny'],
-- type_converters = converters.blitz,
-- compiler = 'gcc')
-- return u,err
--
--
--Using our previous driver you should find that this version takes about the
--same amount of time as the f2py version around .2 seconds to do 2750
--iterations.
--
--For more about weave see
--http://www.scipy.org/Weave
diff --git a/debian/patches/u0-version-sphinx-1.6.patch b/debian/patches/u0-version-sphinx-1.6.patch
deleted file mode 100644
index dc206af..0000000
--- a/debian/patches/u0-version-sphinx-1.6.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-Bug: https://trac.sagemath.org/ticket/23023
-
-From 2ea32c168574623501bcd031253e8e322afa9a8c Mon Sep 17 00:00:00 2001
-From: Jeroen Demeyer <jdemeyer at cage.ugent.be>
-Date: Thu, 18 May 2017 13:43:16 +0200
-Subject: Upgrade to Sphinx 1.6.3
-
----
- build/pkgs/sphinx/checksums.ini | 6 +--
- build/pkgs/sphinx/package-version.txt | 2 +-
- build/pkgs/sphinx/patches/environment.patch | 15 ++++---
- build/pkgs/sphinx/patches/ssl.patch | 62 -----------------------------
- build/pkgs/typing/SPKG.txt | 17 ++++++++
- build/pkgs/typing/checksums.ini | 4 ++
- build/pkgs/typing/dependencies | 5 +++
- build/pkgs/typing/package-version.txt | 1 +
- build/pkgs/typing/spkg-install | 9 +++++
- build/pkgs/typing/type | 1 +
- src/sage_setup/docbuild/__init__.py | 12 +++---
- src/sage_setup/docbuild/ext/multidocs.py | 10 +++--
- src/sage_setup/docbuild/sphinxbuild.py | 2 +
- 13 files changed, 63 insertions(+), 83 deletions(-)
- delete mode 100644 build/pkgs/sphinx/patches/ssl.patch
- create mode 100644 build/pkgs/typing/SPKG.txt
- create mode 100644 build/pkgs/typing/checksums.ini
- create mode 100644 build/pkgs/typing/dependencies
- create mode 100644 build/pkgs/typing/package-version.txt
- create mode 100755 build/pkgs/typing/spkg-install
- create mode 100644 build/pkgs/typing/type
-
-From 6930d06663d7bbac51c840f163ba0874fbd2e9e7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Tue, 8 Aug 2017 14:35:22 +1200
-Subject: Remove language specific targeting as upstream has removed at least
- the only one we are using.
-
----
- src/sage_setup/docbuild/__init__.py | 11 ++---------
- 1 file changed, 2 insertions(+), 9 deletions(-)
-
-From 56bffcc8508c9a0ed9c052d0fc4db5ae9e71e53c Mon Sep 17 00:00:00 2001
-From: "John H. Palmieri" <palmieri at math.washington.edu>
-Date: Thu, 10 Aug 2017 21:45:11 -0700
-Subject: trac 23023: - Create temporary docutils.conf to turn off smart quotes
- during introspection. - Replace deprecated import of Directive. - Silence new
- redundant "WARNING: Build finished" message.
-
----
- src/sage/misc/sphinxify.py | 4 ++++
- src/sage_setup/docbuild/ext/sage_autodoc.py | 2 +-
- src/sage_setup/docbuild/sphinxbuild.py | 1 +
- 3 files changed, 6 insertions(+), 1 deletion(-)
-
-From c48896722c5546fbdca8a58e6516828912d87f85 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fran=C3=A7ois=20Bissey?= <frp.bissey at gmail.com>
-Date: Mon, 14 Aug 2017 11:37:40 +1200
-Subject: Add typing to DOC_DEPENDENCIES
-
----
- build/make/deps | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/sage/src/sage_setup/docbuild/__init__.py
-+++ b/sage/src/sage_setup/docbuild/__init__.py
-@@ -197,8 +197,7 @@
- """
- Builds the PDF files for this document. This is done by first
- (re)-building the LaTeX output, going into that LaTeX
-- directory, and running 'make all-pdf' (or for the special case of
-- the ja docs, 'all-pdf-ja(ex,to run platex)' there.
-+ directory, and running 'make all-pdf' there.
-
- EXAMPLES::
-
-@@ -211,13 +210,7 @@
- pdf_dir = self._output_dir('pdf')
- make_target = "cd '%s' && $MAKE %s && mv -f *.pdf '%s'"
- error_message = "failed to run $MAKE %s in %s"
-- MB_LANG = {'ja': 'all-pdf-ja'} # language name : the modified target
--
-- # Replace the command for languages that require special processing
-- if self.lang in MB_LANG:
-- command = MB_LANG[self.lang]
-- else:
-- command = 'all-pdf'
-+ command = 'all-pdf'
-
- if subprocess.call(make_target%(tex_dir, command, pdf_dir), shell=True):
- raise RuntimeError(error_message%(command, tex_dir))
-@@ -770,14 +763,16 @@
- Returns the Sphinx environment for this project.
- """
- from sphinx.environment import BuildEnvironment
-- class Foo(object):
-- pass
-- config = Foo()
-- config.values = []
-+ class FakeConfig(object):
-+ values = tuple()
-+ class FakeApp(object):
-+ def __init__(self, dir):
-+ self.srcdir = dir
-+ self.config = FakeConfig()
-
- env_pickle = os.path.join(self._doctrees_dir(), 'environment.pickle')
- try:
-- env = BuildEnvironment.frompickle(self.dir, config, env_pickle)
-+ env = BuildEnvironment.frompickle(env_pickle, FakeApp(self.dir))
- logger.debug("Opened Sphinx environment: %s", env_pickle)
- return env
- except IOError as err:
---- a/sage/src/sage_setup/docbuild/ext/multidocs.py
-+++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
-@@ -86,9 +86,10 @@
- env.metadata[ind] = md
- # merge the citations
- newcite = {}
-- for ind, (path, tag) in six.iteritems(docenv.domaindata["std"]["citations"]):
-+ citations = docenv.domaindata["std"]["citations"]
-+ for ind, (path, tag, lineno) in six.iteritems(docenv.domaindata["std"]["citations"]):
- # TODO: Warn on conflicts
-- newcite[ind] = (fixpath(path), tag)
-+ newcite[ind] = (fixpath(path), tag, lineno)
- env.domaindata["std"]["citations"].update(newcite)
- # merge the py:module indexes
- newmodules = {}
-@@ -247,9 +248,10 @@
- cache = cPickle.load(f)
- app.builder.info("done (%s citations)."%len(cache))
- cite = env.domaindata["std"]["citations"]
-- for ind, (path, tag) in six.iteritems(cache):
-+ for ind, (path, tag, lineno) in six.iteritems(cache):
- if ind not in cite: # don't override local citation
-- cite[ind]=(os.path.join("..", path), tag)
-+ cite[ind] = (os.path.join("..", path), tag, lineno)
-+
-
- def init_subdoc(app):
- """
---- a/sage/src/sage_setup/docbuild/sphinxbuild.py
-+++ b/sage/src/sage_setup/docbuild/sphinxbuild.py
-@@ -55,6 +55,9 @@
- re.compile('WARNING: html_static_path entry .* does not exist'),
- re.compile('WARNING: while setting up extension'),
- re.compile('WARNING: Any IDs not assiend for figure node'),
-+ re.compile('WARNING: .* is not referenced'),
-+ re.compile('WARNING: Build finished'),
-+ re.compile('language "hu" not supported'),
- )
-
- # replacements: pairs of regular expressions and their replacements,
---- a/sage/src/sage/misc/sphinxify.py
-+++ b/sage/src/sage/misc/sphinxify.py
-@@ -80,6 +80,10 @@
- # buildername, confoverrides, status, warning, freshenv).
- confdir = os.path.join(SAGE_DOC_SRC, 'en', 'introspect')
-
-+ open(os.path.join(srcdir, 'docutils.conf'), 'w').write(r"""
-+[parsers]
-+smart_quotes = no
-+""")
- doctreedir = os.path.join(srcdir, 'doctrees')
- confoverrides = {'html_context': {}, 'master_doc': 'docstring'}
-
---- a/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
-+++ b/sage/src/sage_setup/docbuild/ext/sage_autodoc.py
-@@ -39,7 +39,7 @@
- from sphinx.pycode import ModuleAnalyzer, PycodeError
- from sphinx.application import ExtensionError
- from sphinx.util.nodes import nested_parse_with_titles
--from sphinx.util.compat import Directive
-+from docutils.parsers.rst import Directive
- from sphinx.util.inspect import getargspec, isdescriptor, safe_getmembers, \
- safe_getattr, object_description, is_builtin_class_method
- from sphinx.util.docstrings import prepare_docstring
---- a/sage/build/make/deps
-+++ b/sage/build/make/deps
-@@ -206,7 +206,7 @@
- | $(SAGERUNTIME) $(inst_maxima) $(inst_networkx) $(inst_scipy) \
- $(inst_matplotlib) $(inst_pillow) $(inst_mathjax) $(inst_mpmath) \
- $(inst_ipykernel) $(inst_jupyter_client) $(inst_conway_polynomials) \
-- $(inst_tachyon) $(inst_jmol) $(inst_thebe) $(inst_ipywidgets)
-+ $(inst_tachyon) $(inst_jmol) $(inst_thebe) $(inst_ipywidgets) $(inst_typing)
-
- doc: doc-html
-
diff --git a/debian/patches/u1-fix-dont-require-DISPLAY.patch b/debian/patches/u1-fix-dont-require-DISPLAY.patch
index 338987b..1d84861 100644
--- a/debian/patches/u1-fix-dont-require-DISPLAY.patch
+++ b/debian/patches/u1-fix-dont-require-DISPLAY.patch
@@ -16,7 +16,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/sage/src/sage/probability/probability_distribution.pyx
+++ b/sage/src/sage/probability/probability_distribution.pyx
-@@ -113,6 +113,7 @@
+@@ -114,6 +114,7 @@
EXAMPLES::
diff --git a/debian/patches/u1-looser-doctest-basename.patch b/debian/patches/u1-looser-doctest-basename.patch
index 3485a09..437cb04 100644
--- a/debian/patches/u1-looser-doctest-basename.patch
+++ b/debian/patches/u1-looser-doctest-basename.patch
@@ -7,7 +7,7 @@ Forwarded: https://trac.sagemath.org/ticket/22445
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/sage/src/sage/doctest/sources.py
+++ b/sage/src/sage/doctest/sources.py
-@@ -85,8 +85,8 @@
+@@ -88,8 +88,8 @@
root = os.path.dirname(path)
# If the file is in the sage library, we can use our knowledge of
# the directory structure
diff --git a/debian/patches/u1-more-sphinx-1.5-fixes.patch b/debian/patches/u1-more-sphinx-1.5-fixes.patch
deleted file mode 100644
index 734dd67..0000000
--- a/debian/patches/u1-more-sphinx-1.5-fixes.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Update to Sphinx 1.5 searchindex.js
- Filename paths also need to be updated, otherwise search snippets won't be
- able to find the source file and "404" will be displayed instead. (The link
- to the html file still works.)
-Author: Dmitry Shachnev <mitya57 at debian.org>
-Bug: https://trac.sagemath.org/ticket/23364
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/sage/src/sage_setup/docbuild/ext/multidocs.py
-+++ b/sage/src/sage_setup/docbuild/ext/multidocs.py
-@@ -148,7 +148,7 @@
- # merge the filenames
- filenames = app.builder.indexer._filenames
- for (res, filename) in six.iteritems(index._filenames):
-- filenames[fixpath(res)] = filename
-+ filenames[fixpath(res)] = fixpath(filename)
- # TODO: merge indexer._objtypes, indexer._objnames as well
-
- # Setup source symbolic links
diff --git a/debian/patches/u1-pip-nowarn.patch b/debian/patches/u1-pip-nowarn.patch
deleted file mode 100644
index e41a6e3..0000000
--- a/debian/patches/u1-pip-nowarn.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Description: Don't output pip warnings, otherwise some doctests fail
- "--format=legacy" suppresses a warning that the default format will
- change from legacy to columns.
-Author: Tobias Hansen <thansen at debian.org>
-Bug: https://trac.sagemath.org/ticket/21835
-Forwarded: not-needed (This solution was mentioned in the bug report.)
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/sage/src/sage/misc/package.py
-+++ b/sage/src/sage/misc/package.py
-@@ -144,7 +144,7 @@
- sage: d['beautifulsoup'] # optional - beautifulsoup
- '...'
- """
-- proc = subprocess.Popen(["pip", "list", "--no-index"], stdout=subprocess.PIPE)
-+ proc = subprocess.Popen(["pip", "list", "--no-index", "--format=legacy"], stdout=subprocess.PIPE)
- stdout = str(proc.communicate()[0])
- return dict((name.lower(), version) for name,version in PIP_VERSION.findall(stdout))
-
diff --git a/debian/patches/u1-scripts-dir.patch b/debian/patches/u1-scripts-dir.patch
index 6d3724c..73d8e98 100644
--- a/debian/patches/u1-scripts-dir.patch
+++ b/debian/patches/u1-scripts-dir.patch
@@ -5,7 +5,7 @@ Forwarded: TODO
--- a/sage/src/sage/env.py
+++ b/sage/src/sage/env.py
-@@ -93,6 +93,7 @@
+@@ -120,6 +120,7 @@
_add_variable_or_fallback('SAGE_ROOT', None)
_add_variable_or_fallback('SAGE_LOCAL', None)
_add_variable_or_fallback('SAGE_ETC', opj('$SAGE_LOCAL', 'etc'))
@@ -15,7 +15,7 @@ Forwarded: TODO
--- a/sage/src/bin/sage
+++ b/sage/src/bin/sage
-@@ -455,13 +455,13 @@
+@@ -456,13 +456,13 @@
#####################################################################
if [ "$1" = '-dumpversion' -o "$1" = '--dumpversion' ]; then
@@ -31,7 +31,7 @@ Forwarded: TODO
echo "SageMath version ${SAGE_VERSION}, Release Date: ${SAGE_RELEASE_DATE}"
exit 0
fi
-@@ -977,14 +977,14 @@
+@@ -978,14 +978,14 @@
shift
sage_setup
if [ "$SAGE_DEBUG" = "no" ]; then
@@ -61,7 +61,7 @@ Forwarded: TODO
fi
}
-@@ -277,7 +277,7 @@
+@@ -315,7 +315,7 @@
SAGE_ORIG_PATH=$PATH && export SAGE_ORIG_PATH
SAGE_ORIG_PATH_SET=True && export SAGE_ORIG_PATH_SET
fi
@@ -127,10 +127,10 @@ Forwarded: TODO
-from sage.env import DOT_SAGE, SAGE_LOCAL
+from sage.env import DOT_SAGE, SAGE_SCRIPTS_DIR
+ from sage.misc.misc import ECL_TMP
from .expect import (Expect, ExpectElement, FunctionElement,
- ExpectFunction, gc_disabled)
-@@ -523,7 +523,7 @@
+@@ -524,7 +524,7 @@
# setting inchar and outchar..
eval_using_file_cutoff = 256
self.__eval_using_file_cutoff = eval_using_file_cutoff
@@ -150,7 +150,7 @@ Forwarded: TODO
which is mostly to make doctesting more predictable.
EXAMPLES::
-@@ -267,7 +267,7 @@
+@@ -268,7 +268,7 @@
INPUT:
@@ -159,7 +159,7 @@ Forwarded: TODO
or a DocTestDefaults object (possibly with some entries modified)
- args -- a list of filenames to doctest
-@@ -969,9 +969,9 @@
+@@ -970,9 +970,9 @@
sage: from sage.doctest.control import DocTestDefaults, DocTestController
sage: DC = DocTestController(DocTestDefaults(timeout=123), ["hello_world.py"])
sage: print(DC._assemble_cmd())
@@ -171,7 +171,7 @@ Forwarded: TODO
opt = dict_difference(self.options.__dict__, DocTestDefaults().__dict__)
for o in ("all", "sagenb"):
if o in opt:
-@@ -1005,14 +1005,14 @@
+@@ -1006,14 +1006,14 @@
sage: DD = DocTestDefaults(gdb=True)
sage: DC = DocTestController(DD, ["hello_world.py"])
sage: DC.run_val_gdb(testing=True)
diff --git a/debian/patches/u2-allow-override-sage-local.patch b/debian/patches/u2-allow-override-sage-local.patch
index 1731214..ac6b4ff 100644
--- a/debian/patches/u2-allow-override-sage-local.patch
+++ b/debian/patches/u2-allow-override-sage-local.patch
@@ -19,7 +19,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
exit 1
--- a/sage/src/bin/sage-env
+++ b/sage/src/bin/sage-env
-@@ -267,7 +267,7 @@
+@@ -305,7 +305,7 @@
export SAGE_ETC="$SAGE_LOCAL/etc"
export SAGE_SHARE="$SAGE_LOCAL/share"
export SAGE_EXTCODE="$SAGE_SHARE/sage/ext"
@@ -30,16 +30,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
export SAGE_DOC_SRC="$SAGE_SRC/doc"
--- a/sage/src/sage/env.py
+++ b/sage/src/sage/env.py
-@@ -78,7 +78,7 @@
- if force:
- value = fallback
- if isinstance(value, six.string_types):
-- for k,v in SAGE_ENV.items():
-+ for k,v in sorted(SAGE_ENV.items(), reverse=True):
- if isinstance(v, six.string_types):
- value = value.replace('$'+k, v)
- SAGE_ENV[key] = value
-@@ -116,7 +116,7 @@
+@@ -141,7 +141,7 @@
_add_variable_or_fallback('SAGE_EXTCODE', opj('$SAGE_SHARE', 'sage', 'ext'))
_add_variable_or_fallback('SAGE_LOGS', opj('$SAGE_ROOT', 'logs', 'pkgs'))
diff --git a/debian/patches/u2-better-sphinx-failure-modes.patch b/debian/patches/u2-better-sphinx-failure-modes.patch
index 665cf00..9c6f6ca 100644
--- a/debian/patches/u2-better-sphinx-failure-modes.patch
+++ b/debian/patches/u2-better-sphinx-failure-modes.patch
@@ -8,7 +8,7 @@ Forwarded: TBD
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/sage/src/sage_setup/docbuild/__init__.py
+++ b/sage/src/sage_setup/docbuild/__init__.py
-@@ -103,8 +103,19 @@
+@@ -104,8 +104,19 @@
try:
runsphinx()
except Exception:
@@ -28,7 +28,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
if "/latex" in output_dir:
logger.warning("LaTeX file written to {}".format(output_dir))
-@@ -234,8 +245,8 @@
+@@ -235,8 +246,8 @@
inventory = builder_helper('inventory')
@@ -39,7 +39,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
from multiprocessing import Pool
pool = Pool(NUM_THREADS, maxtasksperchild=1)
# map_async handles KeyboardInterrupt correctly. Plain map and
-@@ -250,8 +261,8 @@
+@@ -251,8 +262,8 @@
if ABORT_ON_ERROR:
raise
return ret
@@ -50,7 +50,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
results = []
for arg in args:
-@@ -263,6 +274,11 @@
+@@ -264,6 +275,11 @@
return results
diff --git a/debian/patches/u2-fix-less-trivial-test-cases.patch b/debian/patches/u2-fix-less-trivial-test-cases.patch
deleted file mode 100644
index d7f2882..0000000
--- a/debian/patches/u2-fix-less-trivial-test-cases.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: Fix some more test cases with less-trivial failures
- Every override in this file should be accompanied by an explanation on why
- it's correct or beneficial.
-Author: Ximin Luo <infinity0 at debian.org>
-Forwarded: TODO
----
-src/sage/rings/integer.pyx
-Sage upstream expects MPIR's error output but we use GMP.
-They know about this difference and advise us to just override it.
-On 32-bit the error does not change.
---- a/sage/src/sage/rings/integer.pyx
-+++ b/sage/src/sage/rings/integer.pyx
-@@ -6093,7 +6093,7 @@
- sage: 1 << (2^60)
- Traceback (most recent call last):
- ...
-- MemoryError: failed to allocate ... bytes # 64-bit
-+ RuntimeError: Aborted # 64-bit
- OverflowError: ... # 32-bit
- """
- cdef long n
diff --git a/debian/patches/u2-fix-trivial-test-cases.patch b/debian/patches/u2-fix-trivial-test-cases.patch
index 0114af2..9d58bbd 100644
--- a/debian/patches/u2-fix-trivial-test-cases.patch
+++ b/debian/patches/u2-fix-trivial-test-cases.patch
@@ -122,10 +122,10 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+ Usage: tachyon modelfile [options]...
"""
r = os.popen('tachyon').read()
- if use_pager == True:
+ if use_pager:
--- a/sage/src/sage/interfaces/gap.py
+++ b/sage/src/sage/interfaces/gap.py
-@@ -1839,7 +1839,7 @@
+@@ -1841,7 +1841,7 @@
sage: from sage.interfaces.gap import gap_command
sage: cmd = 'echo "quit;" | ' + gap_command(use_workspace_cache=False)[0]
sage: gap_startup = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT)
diff --git a/debian/patches/u2-pari-stackwarn.patch b/debian/patches/u2-pari-stackwarn.patch
index 1614459..27d89f4 100644
--- a/debian/patches/u2-pari-stackwarn.patch
+++ b/debian/patches/u2-pari-stackwarn.patch
@@ -5,7 +5,7 @@ Description: Ignore warnings of PARI increasing the stack size when parsing doct
Author: Tobias Hansen <thansen at debian.org>
--- a/sage/src/sage/doctest/parsing.py
+++ b/sage/src/sage/doctest/parsing.py
-@@ -38,6 +38,7 @@
+@@ -39,6 +39,7 @@
float_regex = re.compile('\s*([+-]?\s*((\d*\.?\d+)|(\d+\.?))([eE][+-]?\d+)?)')
optional_regex = re.compile(r'(long time|not implemented|not tested|known bug)|([^ a-z]\s*optional\s*[:-]*((\s|\w)*))')
@@ -13,7 +13,7 @@ Author: Tobias Hansen <thansen at debian.org>
find_sage_prompt = re.compile(r"^(\s*)sage: ", re.M)
find_sage_continuation = re.compile(r"^(\s*)\.\.\.\.:", re.M)
random_marker = re.compile('.*random', re.I)
-@@ -875,6 +876,7 @@
+@@ -879,6 +880,7 @@
'you'
"""
got = self.human_readable_escape_sequences(got)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sagemath.git
More information about the debian-science-commits
mailing list