From a8b048c686c4b7b5af2c8e6236f496f69e666584 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sun, 5 Aug 2018 16:50:06 +0200 Subject: sage: 8.3 -> 8.4.beta0 --- .../science/math/sage/patches/numpy-1.14.3.patch | 82 +++++++++------------- .../science/math/sage/patches/spkg-scripts.patch | 46 ------------ pkgs/applications/science/math/sage/sage-src.nix | 39 +--------- pkgs/applications/science/math/sage/sagelib.nix | 4 ++ 4 files changed, 40 insertions(+), 131 deletions(-) delete mode 100644 pkgs/applications/science/math/sage/patches/spkg-scripts.patch diff --git a/pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch b/pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch index 5927bc116096..455548c843e0 100644 --- a/pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch +++ b/pkgs/applications/science/math/sage/patches/numpy-1.14.3.patch @@ -1,5 +1,5 @@ diff --git a/src/doc/en/faq/faq-usage.rst b/src/doc/en/faq/faq-usage.rst -index 79b4205fd3..9a89bd2136 100644 +index 2347a1190d..f5b0fe71a4 100644 --- a/src/doc/en/faq/faq-usage.rst +++ b/src/doc/en/faq/faq-usage.rst @@ -338,7 +338,7 @@ ints. For example:: @@ -248,7 +248,7 @@ index df85cce43d..34ea164be0 100644 TESTS:: diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py -index 61b1003002..4baee9cbbd 100644 +index 0a9bd61267..d2193cc2d6 100644 --- a/src/sage/combinat/fully_packed_loop.py +++ b/src/sage/combinat/fully_packed_loop.py @@ -72,11 +72,11 @@ def _make_color_list(n, colors=None, color_map=None, randomize=False): @@ -269,10 +269,10 @@ index 61b1003002..4baee9cbbd 100644 ['blue', 'blue', 'red', 'blue', 'red', 'red', 'red', 'blue'] """ diff --git a/src/sage/finance/time_series.pyx b/src/sage/finance/time_series.pyx -index c37700d14e..49b7298d0b 100644 +index 28779365df..3ab0282861 100644 --- a/src/sage/finance/time_series.pyx +++ b/src/sage/finance/time_series.pyx -@@ -109,8 +109,8 @@ cdef class TimeSeries: +@@ -111,8 +111,8 @@ cdef class TimeSeries: sage: import numpy sage: v = numpy.array([[1,2], [3,4]], dtype=float); v @@ -283,7 +283,7 @@ index c37700d14e..49b7298d0b 100644 sage: finance.TimeSeries(v) [1.0000, 2.0000, 3.0000, 4.0000] sage: finance.TimeSeries(v[:,0]) -@@ -2098,14 +2098,14 @@ cdef class TimeSeries: +@@ -2100,14 +2100,14 @@ cdef class TimeSeries: sage: w[0] = 20 sage: w @@ -379,10 +379,10 @@ index 017c85a96f..33fbb499c5 100644 array([ 0.2 , -0.96]) """ diff --git a/src/sage/functions/other.py b/src/sage/functions/other.py -index 679384c907..d63b295a4c 100644 +index 1883daa3e6..9885222817 100644 --- a/src/sage/functions/other.py +++ b/src/sage/functions/other.py -@@ -390,7 +390,7 @@ class Function_ceil(BuiltinFunction): +@@ -389,7 +389,7 @@ class Function_ceil(BuiltinFunction): sage: import numpy sage: a = numpy.linspace(0,2,6) sage: ceil(a) @@ -391,7 +391,7 @@ index 679384c907..d63b295a4c 100644 Test pickling:: -@@ -539,7 +539,7 @@ class Function_floor(BuiltinFunction): +@@ -553,7 +553,7 @@ class Function_floor(BuiltinFunction): sage: import numpy sage: a = numpy.linspace(0,2,6) sage: floor(a) @@ -400,7 +400,7 @@ index 679384c907..d63b295a4c 100644 sage: floor(x)._sympy_() floor(x) -@@ -840,7 +840,7 @@ def sqrt(x, *args, **kwds): +@@ -869,7 +869,7 @@ def sqrt(x, *args, **kwds): sage: import numpy sage: a = numpy.arange(2,5) sage: sqrt(a) @@ -410,10 +410,10 @@ index 679384c907..d63b295a4c 100644 if isinstance(x, float): return math.sqrt(x) diff --git a/src/sage/functions/trig.py b/src/sage/functions/trig.py -index e7e7a311cd..e7ff78a9de 100644 +index 501e7ff6b6..5f760912f0 100644 --- a/src/sage/functions/trig.py +++ b/src/sage/functions/trig.py -@@ -731,7 +731,7 @@ class Function_arccot(GinacFunction): +@@ -724,7 +724,7 @@ class Function_arccot(GinacFunction): sage: import numpy sage: a = numpy.arange(2, 5) sage: arccot(a) @@ -422,7 +422,7 @@ index e7e7a311cd..e7ff78a9de 100644 """ return math.pi/2 - arctan(x) -@@ -787,7 +787,7 @@ class Function_arccsc(GinacFunction): +@@ -780,7 +780,7 @@ class Function_arccsc(GinacFunction): sage: import numpy sage: a = numpy.arange(2, 5) sage: arccsc(a) @@ -431,7 +431,7 @@ index e7e7a311cd..e7ff78a9de 100644 """ return arcsin(1.0/x) -@@ -845,7 +845,7 @@ class Function_arcsec(GinacFunction): +@@ -838,7 +838,7 @@ class Function_arcsec(GinacFunction): sage: import numpy sage: a = numpy.arange(2, 5) sage: arcsec(a) @@ -440,7 +440,7 @@ index e7e7a311cd..e7ff78a9de 100644 """ return arccos(1.0/x) -@@ -920,13 +920,13 @@ class Function_arctan2(GinacFunction): +@@ -913,13 +913,13 @@ class Function_arctan2(GinacFunction): sage: a = numpy.linspace(1, 3, 3) sage: b = numpy.linspace(3, 6, 3) sage: atan2(a, b) @@ -458,10 +458,10 @@ index e7e7a311cd..e7ff78a9de 100644 TESTS:: diff --git a/src/sage/matrix/constructor.pyx b/src/sage/matrix/constructor.pyx -index 19a1d37df0..5780dfae1c 100644 +index 12136f1773..491bf22e62 100644 --- a/src/sage/matrix/constructor.pyx +++ b/src/sage/matrix/constructor.pyx -@@ -494,8 +494,8 @@ class MatrixFactory(object): +@@ -503,8 +503,8 @@ def matrix(*args, **kwds): [7 8 9] Full MatrixSpace of 3 by 3 dense matrices over Integer Ring sage: n = matrix(QQ, 2, 2, [1, 1/2, 1/3, 1/4]).numpy(); n @@ -473,10 +473,10 @@ index 19a1d37df0..5780dfae1c 100644 [ 1 1/2] [1/3 1/4] diff --git a/src/sage/matrix/matrix_double_dense.pyx b/src/sage/matrix/matrix_double_dense.pyx -index 48e0a8a97f..1be5d35b19 100644 +index 66e54a79a4..5e1d270b02 100644 --- a/src/sage/matrix/matrix_double_dense.pyx +++ b/src/sage/matrix/matrix_double_dense.pyx -@@ -2546,7 +2546,7 @@ cdef class Matrix_double_dense(Matrix_dense): +@@ -2519,7 +2519,7 @@ cdef class Matrix_double_dense(Matrix_dense): sage: P.is_unitary(algorithm='orthonormal') Traceback (most recent call last): ... @@ -485,7 +485,7 @@ index 48e0a8a97f..1be5d35b19 100644 TESTS:: -@@ -3662,8 +3662,8 @@ cdef class Matrix_double_dense(Matrix_dense): +@@ -3635,8 +3635,8 @@ cdef class Matrix_double_dense(Matrix_dense): [0.0 1.0 2.0] [3.0 4.0 5.0] sage: m.numpy() @@ -496,7 +496,7 @@ index 48e0a8a97f..1be5d35b19 100644 Alternatively, numpy automatically calls this function (via the magic :meth:`__array__` method) to convert Sage matrices -@@ -3674,16 +3674,16 @@ cdef class Matrix_double_dense(Matrix_dense): +@@ -3647,16 +3647,16 @@ cdef class Matrix_double_dense(Matrix_dense): [0.0 1.0 2.0] [3.0 4.0 5.0] sage: numpy.array(m) @@ -518,10 +518,10 @@ index 48e0a8a97f..1be5d35b19 100644 dtype('complex128') diff --git a/src/sage/matrix/special.py b/src/sage/matrix/special.py -index c698ba5e97..b743bab354 100644 +index ccbd208810..c3f9a65093 100644 --- a/src/sage/matrix/special.py +++ b/src/sage/matrix/special.py -@@ -705,7 +705,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): +@@ -706,7 +706,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): sage: import numpy sage: entries = numpy.array([1.2, 5.6]); entries @@ -530,7 +530,7 @@ index c698ba5e97..b743bab354 100644 sage: A = diagonal_matrix(3, entries); A [1.2 0.0 0.0] [0.0 5.6 0.0] -@@ -715,7 +715,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): +@@ -716,7 +716,7 @@ def diagonal_matrix(arg0=None, arg1=None, arg2=None, sparse=True): sage: j = numpy.complex(0,1) sage: entries = numpy.array([2.0+j, 8.1, 3.4+2.6*j]); entries @@ -540,10 +540,10 @@ index c698ba5e97..b743bab354 100644 [2.0 + 1.0*I 0.0 0.0] [ 0.0 8.1 0.0] diff --git a/src/sage/modules/free_module_element.pyx b/src/sage/modules/free_module_element.pyx -index 230f142117..2ab1c0ae68 100644 +index 3b9a37e9ee..3f5ea14a9d 100644 --- a/src/sage/modules/free_module_element.pyx +++ b/src/sage/modules/free_module_element.pyx -@@ -982,7 +982,7 @@ cdef class FreeModuleElement(Vector): # abstract base class +@@ -987,7 +987,7 @@ cdef class FreeModuleElement(Vector): # abstract base class sage: v.numpy() array([1, 2, 5/6], dtype=object) sage: v.numpy(dtype=float) @@ -552,7 +552,7 @@ index 230f142117..2ab1c0ae68 100644 sage: v.numpy(dtype=int) array([1, 2, 0]) sage: import numpy -@@ -993,7 +993,7 @@ cdef class FreeModuleElement(Vector): # abstract base class +@@ -998,7 +998,7 @@ cdef class FreeModuleElement(Vector): # abstract base class be more efficient but may have unintended consequences:: sage: v.numpy(dtype=None) @@ -596,22 +596,6 @@ index 39fc2970de..2badf98284 100644 """ if dtype is None or dtype is self._vector_numpy.dtype: from copy import copy -diff --git a/src/sage/numerical/optimize.py b/src/sage/numerical/optimize.py -index 17b5ebb84b..92ce35c502 100644 ---- a/src/sage/numerical/optimize.py -+++ b/src/sage/numerical/optimize.py -@@ -486,9 +486,9 @@ def minimize_constrained(func,cons,x0,gradient=None,algorithm='default', **args) - else: - min = optimize.fmin_tnc(f, x0, approx_grad=True, bounds=cons, messages=0, **args)[0] - elif isinstance(cons[0], function_type) or isinstance(cons[0], Expression): -- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args) -+ min = optimize.fmin_cobyla(f, x0, cons, disp=0, **args) - elif isinstance(cons, function_type) or isinstance(cons, Expression): -- min = optimize.fmin_cobyla(f, x0, cons, iprint=0, **args) -+ min = optimize.fmin_cobyla(f, x0, cons, disp=0, **args) - return vector(RDF, min) - - diff --git a/src/sage/plot/complex_plot.pyx b/src/sage/plot/complex_plot.pyx index ad9693da62..758fb709b7 100644 --- a/src/sage/plot/complex_plot.pyx @@ -718,7 +702,7 @@ index f3da57c370..3806f4b32f 100644 TESTS: diff --git a/src/sage/probability/probability_distribution.pyx b/src/sage/probability/probability_distribution.pyx -index f66cd898b9..35995886d5 100644 +index 797ca571bc..38a707b7fb 100644 --- a/src/sage/probability/probability_distribution.pyx +++ b/src/sage/probability/probability_distribution.pyx @@ -130,7 +130,17 @@ cdef class ProbabilityDistribution: @@ -741,10 +725,10 @@ index f66cd898b9..35995886d5 100644 import pylab l = [float(self.get_random_element()) for _ in range(num_samples)] diff --git a/src/sage/rings/rational.pyx b/src/sage/rings/rational.pyx -index a0bfe080f5..7d95e7a1a8 100644 +index 12ca1b222b..9bad7dae0c 100644 --- a/src/sage/rings/rational.pyx +++ b/src/sage/rings/rational.pyx -@@ -1056,7 +1056,7 @@ cdef class Rational(sage.structure.element.FieldElement): +@@ -1041,7 +1041,7 @@ cdef class Rational(sage.structure.element.FieldElement): dtype('O') sage: numpy.array([1, 1/2, 3/4]) @@ -754,10 +738,10 @@ index a0bfe080f5..7d95e7a1a8 100644 if mpz_cmp_ui(mpq_denref(self.value), 1) == 0: if mpz_fits_slong_p(mpq_numref(self.value)): diff --git a/src/sage/rings/real_mpfr.pyx b/src/sage/rings/real_mpfr.pyx -index 4c630867a4..64e2187f5b 100644 +index 9b90c8833e..1ce05b937d 100644 --- a/src/sage/rings/real_mpfr.pyx +++ b/src/sage/rings/real_mpfr.pyx -@@ -1438,7 +1438,7 @@ cdef class RealNumber(sage.structure.element.RingElement): +@@ -1439,7 +1439,7 @@ cdef class RealNumber(sage.structure.element.RingElement): sage: import numpy sage: numpy.arange(10.0) @@ -767,7 +751,7 @@ index 4c630867a4..64e2187f5b 100644 dtype('float64') sage: numpy.array([1.000000000000000000000000000000000000]).dtype diff --git a/src/sage/schemes/elliptic_curves/height.py b/src/sage/schemes/elliptic_curves/height.py -index 3d270ebf9d..1144f168e3 100644 +index 443599a9c1..1ba5e36559 100644 --- a/src/sage/schemes/elliptic_curves/height.py +++ b/src/sage/schemes/elliptic_curves/height.py @@ -1623,18 +1623,18 @@ class EllipticCurveCanonicalHeight: @@ -798,7 +782,7 @@ index 3d270ebf9d..1144f168e3 100644 tau = self.tau(v) fk, err = self.fk_intervals(v, 15, CDF) diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx -index 2dcb0492b9..2b1a06385c 100644 +index 5b37859c93..3ca64124d4 100644 --- a/src/sage/symbolic/ring.pyx +++ b/src/sage/symbolic/ring.pyx @@ -1135,7 +1135,7 @@ cdef class NumpyToSRMorphism(Morphism): diff --git a/pkgs/applications/science/math/sage/patches/spkg-scripts.patch b/pkgs/applications/science/math/sage/patches/spkg-scripts.patch deleted file mode 100644 index 4d37998b288b..000000000000 --- a/pkgs/applications/science/math/sage/patches/spkg-scripts.patch +++ /dev/null @@ -1,46 +0,0 @@ -commit f02714d4aea80e17cb8df62bab75d7c1a1b61a8e -Author: Timo Kaufmann -Date: Mon Jul 9 18:26:18 2018 +0200 - - Don't attempt to create dirs when showing pkg info - - The script dir cannot be assumed to be writeable after installation. - -diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg -index f3e02aeae5..190d558ad1 100755 ---- a/build/bin/sage-spkg -+++ b/build/bin/sage-spkg -@@ -167,14 +167,6 @@ if [ -z "$SAGE_BUILD_DIR" ]; then - export SAGE_BUILD_DIR="$SAGE_LOCAL/var/tmp/sage/build" - fi - --for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS"; do -- mkdir -p "$dir" -- if [ $? -ne 0 ]; then -- error_msg "Error creating directory $dir" -- exit 1 -- fi --done -- - - # Remove '.' from PYTHONPATH, which may also come from SAGE_PATH, to avoid - # trouble with setuptools / easy_install (cf. #10192, #10176): -@@ -563,11 +555,13 @@ fi - # Setup directories - ################################################################## - --mkdir -p "$SAGE_BUILD_DIR" --if [ $? -ne 0 ]; then -- error_msg "Error creating directory $SAGE_BUILD_DIR" -- exit 1 --fi -+for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS" "$SAGE_BUILD_DIR"; do -+ mkdir -p "$dir" -+ if [ $? -ne 0 ]; then -+ error_msg "Error creating directory $dir" -+ exit 1 -+ fi -+done - - # Trac #5852: check write permissions - if [ ! -w "$SAGE_BUILD_DIR" ]; then diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 1144057b188d..ab8d630802eb 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,32 +3,17 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.3"; + version = "8.4.beta0"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "0mbm99m5xry21xpi4q3q96gx392liwbifywf5awvl0j85a7rkfyx"; + sha256 = "1jph4slscpni0smp2fxs3s12282c9r3mdfbgxpyx67gic0d9iya8"; }; nixPatches = [ - # https://trac.sagemath.org/ticket/25809 - ./patches/spkg-scripts.patch - - # https://trac.sagemath.org/ticket/25309 - (fetchpatch { - name = "spkg-paths.patch"; - url = "https://git.sagemath.org/sage.git/patch/?h=97f06fddee920399d4fcda65aa9b0925774aec69&id=a86151429ccce1ddd085e8090ada8ebdf02f3310"; - sha256 = "1xb9108rzzkdhn71vw44525620d3ww9jv1fph5a77v9y7nf9wgr7"; - }) - (fetchpatch { - name = "maxima-fas.patch"; - url = "https://git.sagemath.org/sage.git/patch/?h=97f06fddee920399d4fcda65aa9b0925774aec69"; - sha256 = "14s50yg3hpw9cp3v581dx7zfmpm2j972im7x30iwki8k45mjvk3i"; - }) - # https://trac.sagemath.org/ticket/25722 ./patches/test-in-tmpdir.patch @@ -63,12 +48,6 @@ stdenv.mkDerivation rec { ]; packageUpgradePatches = [ - (fetchpatch { - name = "cypari2-1.2.1.patch"; - url = "https://git.sagemath.org/sage.git/patch/?h=62fe6eb15111327d930336d4252d5b23cbb22ab9"; - sha256 = "1xax7vvs8h4xip16xcsp47xdb6lig6f2r3pl8cksvlz8lhgbyxh2"; - }) - # matplotlib 2.2.2 deprecated `normed` (replaced by `density`). # This patch only ignores the warning. It would be equally easy to fix it # (by replacing all mentions of `normed` by `density`), but its better to @@ -104,12 +83,7 @@ stdenv.mkDerivation rec { # https://trac.sagemath.org/ticket/24735 ./patches/singular-4.1.1p2.patch - # https://trac.sagemath.org/ticket/25567 and dependency #25635 - (fetchpatch { - name = "pari-upgrade-dependency.patch"; - url = "https://git.sagemath.org/sage.git/patch/?id=6995e7cae1b3476ad0145f8dfc897cf91f0c3c4d"; - sha256 = "1dvhabl1c9pwd9xkjvbjjg15mvb14b24p1f3cby1mlqk34d4lrs6"; - }) + # https://trac.sagemath.org/ticket/25567 (fetchpatch { name = "pari-2.11.0.patch"; url = "https://git.sagemath.org/sage.git/patch/?id=7af4748cab37d651eaa88be501db88f4a5ffc584"; @@ -122,13 +96,6 @@ stdenv.mkDerivation rec { url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa"; sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb"; }) - - # cddlib 0.94i -> 0.94j - (fetchpatch { - name = "cddlib-0.94j.patch"; - url = "https://git.sagemath.org/sage.git/patch/?id=2ab1546b3e21d1d0ab3b4fcd58576848b3a2d888"; - sha256 = "1c5gnasq7y9xxj762bn79bis0zi8d9bgg7jzlf64ifixsrc5cymb"; - }) ]; patches = nixPatches ++ packageUpgradePatches ++ [ diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix index abcefba5e260..d26f5dad724e 100644 --- a/pkgs/applications/science/math/sage/sagelib.nix +++ b/pkgs/applications/science/math/sage/sagelib.nix @@ -47,6 +47,8 @@ , singular , pip , jupyter_core +, libhomfly +, libbraiding }: buildPythonPackage rec { @@ -109,6 +111,8 @@ buildPythonPackage rec { pip cython cysignals + libhomfly + libbraiding ]; buildPhase = '' -- cgit 1.4.1 From 52b9217b50379007c9de158d314e4d96134746f9 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 16 Aug 2018 00:17:14 +0200 Subject: sage: 8.4.beta0 -> 8.4.beta1 --- .../math/sage/patches/dochtml-optional.patch | 127 --------------------- .../science/math/sage/patches/eclib-20180710.patch | 24 ---- .../math/sage/patches/pari-no-threads.patch | 18 --- .../science/math/sage/patches/test-in-tmpdir.patch | 31 ----- pkgs/applications/science/math/sage/sage-src.nix | 36 +----- 5 files changed, 2 insertions(+), 234 deletions(-) delete mode 100644 pkgs/applications/science/math/sage/patches/dochtml-optional.patch delete mode 100644 pkgs/applications/science/math/sage/patches/pari-no-threads.patch delete mode 100644 pkgs/applications/science/math/sage/patches/test-in-tmpdir.patch diff --git a/pkgs/applications/science/math/sage/patches/dochtml-optional.patch b/pkgs/applications/science/math/sage/patches/dochtml-optional.patch deleted file mode 100644 index a51e30312ed9..000000000000 --- a/pkgs/applications/science/math/sage/patches/dochtml-optional.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff --git a/src/doc/common/conf.py b/src/doc/common/conf.py -index 25f94f7b7d..9f6139ea4a 100644 ---- a/src/doc/common/conf.py -+++ b/src/doc/common/conf.py -@@ -622,9 +622,9 @@ def call_intersphinx(app, env, node, contnode): - Check that the link from the thematic tutorials to the reference - manual is relative, see :trac:`20118`:: - -- sage: from sage.env import SAGE_DOC -- sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html") -- sage: for line in open(thematic_index).readlines(): -+ sage: from sage.env import SAGE_DOC # optional - dochtml -+ sage: thematic_index = os.path.join(SAGE_DOC, "html", "en", "thematic_tutorials", "index.html") # optional - dochtml -+ sage: for line in open(thematic_index).readlines(): # optional - dochtml - ....: if "padics" in line: - ....: sys.stdout.write(line) -
  • Introduction to the -adics
  • -diff --git a/src/sage/doctest/control.py b/src/sage/doctest/control.py -index 4236fd05e0..8e499cbaf7 100644 ---- a/src/sage/doctest/control.py -+++ b/src/sage/doctest/control.py -@@ -87,7 +87,7 @@ class DocTestDefaults(SageObject): - self.sagenb = False - self.long = False - self.warn_long = None -- self.optional = set(['sage']) | auto_optional_tags -+ self.optional = set(['sage', 'dochtml']) | auto_optional_tags - self.randorder = None - self.global_iterations = 1 # sage-runtests default is 0 - self.file_iterations = 1 # sage-runtests default is 0 -@@ -343,7 +343,8 @@ class DocTestController(SageObject): - if not optionaltag_regex.search(o): - raise ValueError('invalid optional tag {!r}'.format(o)) - -- options.optional |= auto_optional_tags -+ if "sage" in options.optional: -+ options.optional |= auto_optional_tags - - self.options = options - self.files = args -@@ -741,7 +742,7 @@ class DocTestController(SageObject): - sage: DC = DocTestController(DD, [dirname]) - sage: DC.expand_files_into_sources() - sage: sorted(DC.sources[0].options.optional) # abs tol 1 -- ['guava', 'magma', 'py3'] -+ ['guava', 'magma'] - - We check that files are skipped appropriately:: - -@@ -968,7 +969,7 @@ class DocTestController(SageObject): - sage: from sage.doctest.control import DocTestDefaults, DocTestController - sage: DC = DocTestController(DocTestDefaults(), []) - sage: DC._optional_tags_string() -- 'sage' -+ 'dochtml,sage' - sage: DC = DocTestController(DocTestDefaults(optional="all,and,some,more"), []) - sage: DC._optional_tags_string() - 'all' -diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py -index 9255aa848f..cc4712d3ec 100644 ---- a/src/sage/misc/sagedoc.py -+++ b/src/sage/misc/sagedoc.py -@@ -18,9 +18,9 @@ TESTS: - Check that argspecs of extension function/methods appear correctly, - see :trac:`12849`:: - -- sage: from sage.env import SAGE_DOC -- sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html') -- sage: with open(docfilename) as fobj: -+ sage: from sage.env import SAGE_DOC # optional - dochtml -+ sage: docfilename = os.path.join(SAGE_DOC, 'html', 'en', 'reference', 'calculus', 'sage', 'symbolic', 'expression.html') # optional - dochtml -+ sage: with open(docfilename) as fobj: # optional - dochtml - ....: for line in fobj: - ....: if "#sage.symbolic.expression.Expression.numerical_approx" in line: - ....: print(line) -@@ -790,11 +790,12 @@ def _search_src_or_doc(what, string, extra1='', extra2='', extra3='', - - :: - -- sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1 -+ sage: from sage.misc.sagedoc import _search_src_or_doc # optional - dochtml -+ sage: len(_search_src_or_doc('src', r'matrix\(', 'incidence_structures', 'self', 'combinat', interact=False).splitlines()) > 1 # optional - dochtml - True -- sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False) # long time (4s on sage.math, 2012) -+ sage: 'abvar/homology' in _search_src_or_doc('doc', 'homology', 'variety', interact=False) # optional - dochtml, long time (4s on sage.math, 2012) - True -- sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) -+ sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False) # optional - dochtml - True - """ - # process keywords -@@ -1160,9 +1161,9 @@ def search_doc(string, extra1='', extra2='', extra3='', extra4='', - counting the length of ``search_doc('tree', - interact=False).splitlines()`` gives the number of matches. :: - -- sage: len(search_doc('tree', interact=False).splitlines()) > 4000 # long time -+ sage: len(search_doc('tree', interact=False).splitlines()) > 4000 # optional - dochtml, long time - True -- sage: len(search_doc('tree', whole_word=True, interact=False).splitlines()) < 2000 # long time -+ sage: len(search_doc('tree', whole_word=True, interact=False).splitlines()) < 2000 # optional - dochtml, long time - True - """ - return _search_src_or_doc('doc', string, extra1=extra1, extra2=extra2, -@@ -1332,9 +1333,9 @@ class _sage_doc: - - EXAMPLES:: - -- sage: browse_sage_doc._open("reference", testing=True)[0] # indirect doctest -+ sage: browse_sage_doc._open("reference", testing=True)[0] # optional - dochtml, indirect doctest - 'http://localhost:8000/doc/live/reference/index.html' -- sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47] -+ sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47] # optional - dochtml - 'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring' - """ - def __init__(self): -@@ -1494,9 +1495,9 @@ class _sage_doc: - - EXAMPLES:: - -- sage: browse_sage_doc._open("reference", testing=True)[0] -+ sage: browse_sage_doc._open("reference", testing=True)[0] # optional - dochtml - 'http://localhost:8000/doc/live/reference/index.html' -- sage: browse_sage_doc._open("tutorial", testing=True)[1] -+ sage: browse_sage_doc._open("tutorial", testing=True)[1] # optional - dochtml - '.../html/en/tutorial/index.html' - """ - url = self._base_url + os.path.join(name, "index.html") diff --git a/pkgs/applications/science/math/sage/patches/eclib-20180710.patch b/pkgs/applications/science/math/sage/patches/eclib-20180710.patch index d06e1e6cedf2..986ae42aeb62 100644 --- a/pkgs/applications/science/math/sage/patches/eclib-20180710.patch +++ b/pkgs/applications/science/math/sage/patches/eclib-20180710.patch @@ -14,27 +14,3 @@ index 4417b59276..ae57ca2991 100644 """ global instances try: -diff --git a/src/sage/libs/eclib/wrap.cpp b/src/sage/libs/eclib/wrap.cpp -index 5fd5693b53..d12468faa8 100644 ---- a/src/sage/libs/eclib/wrap.cpp -+++ b/src/sage/libs/eclib/wrap.cpp -@@ -133,8 +133,8 @@ char* Curvedata_isogeny_class(struct Curvedata* E, int verbose) - - - int mw_process(struct Curvedata* curve, struct mw* m, -- const struct bigint* x, const struct bigint* y, -- const struct bigint* z, int sat) -+ const bigint* x, const bigint* y, -+ const bigint* z, int sat) - { - Point P(*curve, *x, *y, *z); - if (!P.isvalid()) -@@ -188,7 +188,7 @@ int mw_rank(struct mw* m) - } - - /* Returns index and unsat long array, which user must deallocate */ --int mw_saturate(struct mw* m, struct bigint* index, char** unsat, -+int mw_saturate(struct mw* m, bigint* index, char** unsat, - long sat_bd, int odd_primes_only) - { - vector v; diff --git a/pkgs/applications/science/math/sage/patches/pari-no-threads.patch b/pkgs/applications/science/math/sage/patches/pari-no-threads.patch deleted file mode 100644 index 13b47dbdd31b..000000000000 --- a/pkgs/applications/science/math/sage/patches/pari-no-threads.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/src/sage/libs/pari/__init__.py b/src/sage/libs/pari/__init__.py -index e451766474..77eda66097 100644 ---- a/src/sage/libs/pari/__init__.py -+++ b/src/sage/libs/pari/__init__.py -@@ -205,6 +205,13 @@ def _get_pari_instance(): - # messages in Sage. - P.default("debugmem", 0) - -+ # Make sure pari doesn't use threads, regardless of how it was compiled. -+ # Threads cause some doctest failures (memory issues). Those could probably -+ # be solved without disabling threads. But that would require figuring out -+ # some sensible values for `threadsizemax`. See -+ # https://pari.math.u-bordeaux.fr/dochtml/html/GP_defaults.html -+ P.default("nbthreads", 1) -+ - return P - - pari = _get_pari_instance() diff --git a/pkgs/applications/science/math/sage/patches/test-in-tmpdir.patch b/pkgs/applications/science/math/sage/patches/test-in-tmpdir.patch deleted file mode 100644 index febab3702771..000000000000 --- a/pkgs/applications/science/math/sage/patches/test-in-tmpdir.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py -index aa23c8405d..8a87de0591 100644 ---- a/src/sage/repl/ipython_kernel/install.py -+++ b/src/sage/repl/ipython_kernel/install.py -@@ -112,7 +112,7 @@ class SageKernelSpec(object): - EXAMPLES:: - - sage: from sage.repl.ipython_kernel.install import SageKernelSpec -- sage: spec = SageKernelSpec() -+ sage: spec = SageKernelSpec(prefix = tmp_dir()) - sage: spec.use_local_mathjax() - sage: mathjax = os.path.join(spec.nbextensions_dir, 'mathjax') - sage: os.path.isdir(mathjax) -@@ -129,7 +129,7 @@ class SageKernelSpec(object): - EXAMPLES:: - - sage: from sage.repl.ipython_kernel.install import SageKernelSpec -- sage: spec = SageKernelSpec() -+ sage: spec = SageKernelSpec(prefix = tmp_dir()) - sage: spec.use_local_jsmol() - sage: jsmol = os.path.join(spec.nbextensions_dir, 'jsmol') - sage: os.path.isdir(jsmol) -@@ -146,7 +146,7 @@ class SageKernelSpec(object): - EXAMPLES:: - - sage: from sage.repl.ipython_kernel.install import SageKernelSpec -- sage: spec = SageKernelSpec() -+ sage: spec = SageKernelSpec(prefix = tmp_dir()) - sage: spec.use_local_threejs() - sage: threejs = os.path.join(spec.nbextensions_dir, 'threejs') - sage: os.path.isdir(threejs) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 3dd62817bde7..43360f76da69 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,20 +3,17 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta0"; + version = "8.4.beta1"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "1jph4slscpni0smp2fxs3s12282c9r3mdfbgxpyx67gic0d9iya8"; + sha256 = "0yk5ndjr1kap7vhd2i6i5bpcfgmr4fhypn6x7myiymiy9s93d37j"; }; nixPatches = [ - # https://trac.sagemath.org/ticket/25722 - ./patches/test-in-tmpdir.patch - # https://trac.sagemath.org/ticket/25358 (fetchpatch { name = "safe-directory-test-without-patch.patch"; @@ -30,21 +27,6 @@ stdenv.mkDerivation rec { # https://trac.sagemath.org/ticket/25316 # https://github.com/python/cpython/pull/7476 ./patches/python-5755-hotpatch.patch - - # https://trac.sagemath.org/ticket/25315 - (fetchpatch { - name = "find-libraries-in-dyld-library-path.patch"; - url = "https://git.sagemath.org/sage.git/patch/?h=20d4593876ce9c6004eac2ab6fd61786d0d96a06"; - sha256 = "1k3afq3qlzmgqwx6rzs5wv153vv9dsf5rk8pi61g57l3r3npbjmc"; - }) - - # https://trac.sagemath.org/ticket/25345 - # (upstream patch doesn't apply on 8.2 source) - ./patches/dochtml-optional.patch - - # work with pari with threads enabled at compile time (disable them at runtime) - # https://trac.sagemath.org/ticket/26002 - ./patches/pari-no-threads.patch ]; packageUpgradePatches = [ @@ -96,20 +78,6 @@ stdenv.mkDerivation rec { url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa"; sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb"; }) - - # cddlib 0.94i -> 0.94j - (fetchpatch { - name = "cddlib-0.94j.patch"; - url = "https://git.sagemath.org/sage.git/patch/?id=2ab1546b3e21d1d0ab3b4fcd58576848b3a2d888"; - sha256 = "1c5gnasq7y9xxj762bn79bis0zi8d9bgg7jzlf64ifixsrc5cymb"; - }) - - # arb 2.13.0 -> 2.14.0 - (fetchpatch { - name = "arb-2.14.0.patch"; - url = "https://git.sagemath.org/sage.git/patch?id2=8.4.beta0&id=8bef4fd2876a61969b516fe4eb3b8ad7cc076c5e"; - sha256 = "00p3hfsfn3w2vxgd9fjd23mz7xfxjfravf8ysjxkyd657jbkpjmk"; - }) ]; patches = nixPatches ++ packageUpgradePatches ++ [ -- cgit 1.4.1 From 1b42a1ba1e63ce4703216903c79c0836eaf53aeb Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 25 Aug 2018 14:04:46 +0200 Subject: sage: 8.4.beta1 -> 8.4.beta2 --- .../science/math/sage/env-locations.nix | 1 + .../math/sage/patches/singular-4.1.1p2.patch | 274 --------------------- pkgs/applications/science/math/sage/sage-src.nix | 24 +- 3 files changed, 4 insertions(+), 295 deletions(-) delete mode 100644 pkgs/applications/science/math/sage/patches/singular-4.1.1p2.patch diff --git a/pkgs/applications/science/math/sage/env-locations.nix b/pkgs/applications/science/math/sage/env-locations.nix index 288ffd6e0e1a..098ce3925cf3 100644 --- a/pkgs/applications/science/math/sage/env-locations.nix +++ b/pkgs/applications/science/math/sage/env-locations.nix @@ -38,6 +38,7 @@ writeTextFile rec { export COMBINATORIAL_DESIGN_DATA_DIR="${combinatorial_designs}/share/combinatorial_designs" export CREMONA_MINI_DATA_DIR="${elliptic_curves}/share/cremona" export JMOL_DIR="${jmol}" + export JSMOL_DIR="${jmol}/share/jsmol" export MATHJAX_DIR="${mathjax}/lib/node_modules/mathjax" export THREEJS_DIR="${three}/lib/node_modules/three" export SAGE_INCLUDE_DIRECTORIES="${cysignals}/lib/python2.7/site-packages" diff --git a/pkgs/applications/science/math/sage/patches/singular-4.1.1p2.patch b/pkgs/applications/science/math/sage/patches/singular-4.1.1p2.patch deleted file mode 100644 index 4c8df92904ed..000000000000 --- a/pkgs/applications/science/math/sage/patches/singular-4.1.1p2.patch +++ /dev/null @@ -1,274 +0,0 @@ -diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py -index 9d65c9fa6c..a028bbe719 100644 ---- a/src/sage/interfaces/singular.py -+++ b/src/sage/interfaces/singular.py -@@ -654,7 +654,7 @@ class Singular(ExtraTabCompletion, Expect): - - s = Expect.eval(self, x, **kwds) - -- if s.find("error") != -1 or s.find("Segment fault") != -1: -+ if s.find("error occurred") != -1 or s.find("Segment fault") != -1: - raise SingularError('Singular error:\n%s'%s) - - if get_verbose() > 0: -@@ -1079,7 +1079,7 @@ class Singular(ExtraTabCompletion, Expect): - sage: S = singular.ring('real', '(a,b)', 'lp') - sage: singular.current_ring() - polynomial ring, over a field, global ordering -- // coefficients: float -+ // coefficients: Float() - // number of vars : 2 - // block 1 : ordering lp - // : names a b -@@ -1157,7 +1157,7 @@ class Singular(ExtraTabCompletion, Expect): - sage: singular._tab_completion() - ['exteriorPower', - ... -- 'flintZ'] -+ 'crossprod'] - """ - p = re.compile("// *([a-z0-9A-Z_]*).*") #compiles regular expression - proclist = self.eval("listvar(proc)").splitlines() -@@ -1183,7 +1183,7 @@ class Singular(ExtraTabCompletion, Expect): - EXAMPLES:: - - sage: singular.version() -- "Singular ... version 4.1.0 ... -+ "Singular ... version 4... - """ - return singular_version() - -@@ -1562,7 +1562,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): - elif charstr[0] in ['0', 'QQ']: - from sage.all import QQ - br = QQ -- elif charstr[0]=='real': -+ elif charstr[0].startswith('Float'): - from sage.all import RealField, ceil, log - prec = singular.eval('ringlist(basering)[1][2][1]') - br = RealField(ceil((ZZ(prec)+1)/log(2,10))) -@@ -1750,7 +1750,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): - - # Singular 4 puts parentheses around floats and sign outside them - charstr = self.parent().eval('charstr(basering)').split(',',1) -- if charstr[0] in ['real', 'complex']: -+ if charstr[0]=='complex' or charstr[0].startswith('Float'): - for i in range(coeff_start, 2 * coeff_start): - singular_poly_list[i] = singular_poly_list[i].replace('(','').replace(')','') - -@@ -1992,7 +1992,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): - sage: S = singular.ring('real', '(a,b)', 'lp') - sage: singular.current_ring() - polynomial ring, over a field, global ordering -- // coefficients: float -+ // coefficients: Float() - // number of vars : 2 - // block 1 : ordering lp - // : names a b -@@ -2072,7 +2072,7 @@ class SingularElement(ExtraTabCompletion, ExpectElement): - sage: R._tab_completion() - ['exteriorPower', - ... -- 'flintZ'] -+ 'crossprod'] - """ - return self.parent()._tab_completion() - -@@ -2358,7 +2358,7 @@ def singular_version(): - EXAMPLES:: - - sage: singular.version() -- "Singular ... version 4.1.0 ... -+ "Singular ... version 4... - """ - return singular.eval('system("--version");') - -diff --git a/src/sage/libs/singular/decl.pxd b/src/sage/libs/singular/decl.pxd -index 4b658c4807..d863740419 100644 ---- a/src/sage/libs/singular/decl.pxd -+++ b/src/sage/libs/singular/decl.pxd -@@ -170,7 +170,7 @@ cdef extern from "singular/Singular/libsingular.h": - - int n_NumberOfParameters(const n_Procs_s* r) - -- ctypedef struct poly "polyrec": -+ ctypedef struct poly "spolyrec": - poly *next - number *coef - unsigned long exp[1] -@@ -630,9 +630,13 @@ cdef extern from "singular/Singular/libsingular.h": - # return p*q, destroys p and q - poly *p_Mult_q(poly *p, poly *q, ring *r) - -+ # polynomial division, ignoring the rest -+ # via singclap_pdivide resp. idLift, destroys p,q -+ poly *p_Divide(poly *p, poly *q, ring *r) -+ - # divide monomial p by monomial q, p,q const - -- poly *pDivide(poly *p,poly *q) -+ poly *pMDivide(poly *p,poly *q) - - # return the i-th power of p; p destroyed, requires global ring - -diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx -index 2a8d9ae021..aeff53af6c 100644 ---- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx -+++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx -@@ -190,8 +190,8 @@ from sage.libs.singular.decl cimport ( - n_IsUnit, n_Invers, - p_ISet, rChangeCurrRing, p_Copy, p_Init, p_SetCoeff, p_Setm, p_SetExp, p_Add_q, - p_NSet, p_GetCoeff, p_Delete, p_GetExp, pNext, rRingVar, omAlloc0, omStrDup, -- omFree, pDivide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy, -- pDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy, -+ omFree, pMDivide, p_Divide, p_SetCoeff0, n_Init, p_DivisibleBy, pLcm, p_LmDivisibleBy, -+ pMDivide, p_IsConstant, p_ExpVectorEqual, p_String, p_LmInit, n_Copy, - p_IsUnit, p_Series, p_Head, idInit, fast_map_common_subexp, id_Delete, - p_IsHomogeneous, p_Homogen, p_Totaldegree,pLDeg1_Totaldegree, singclap_pdivide, singclap_factorize, - idLift, IDELEMS, On, Off, SW_USE_CHINREM_GCD, SW_USE_EZGCD, -@@ -1693,8 +1693,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): - if not g._poly: - raise ZeroDivisionError - -- if r!=currRing: rChangeCurrRing(r) # pDivide -- res = pDivide(f._poly, g._poly) -+ if r!=currRing: rChangeCurrRing(r) # pMDivide -+ res = pMDivide(f._poly, g._poly) - if coeff: - if r.cf.type == n_unknown or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): - n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) -@@ -1853,8 +1853,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base): - and (g) \ - and g.parent() is self \ - and p_LmDivisibleBy((g)._poly, m, r): -- if r!=currRing: rChangeCurrRing(r) # pDivide -- flt = pDivide(f._poly, (g)._poly) -+ if r!=currRing: rChangeCurrRing(r) # pMDivide -+ flt = pMDivide(f._poly, (g)._poly) - #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((g)._poly, r), r), r) - p_SetCoeff(flt, n_Init(1, r), r) - return new_MP(self,flt), g -@@ -4023,16 +4023,6 @@ cdef class MPolynomial_libsingular(MPolynomial): - Traceback (most recent call last): - ... - NotImplementedError: Division of multivariate polynomials over non fields by non-monomials not implemented. -- -- TESTS:: -- -- sage: P. = ZZ[] -- sage: p = 3*(-x^8*y^2 - x*y^9 + 6*x^8*y + 17*x^2*y^6 - x^3*y^2) -- sage: q = 7*(x^2 + x*y + y^2 + 1) -- sage: p*q//q == p -- True -- sage: p*q//p == q -- True - """ - cdef MPolynomialRing_libsingular parent = self._parent - cdef ring *r = self._parent_ring -@@ -4052,13 +4042,18 @@ cdef class MPolynomial_libsingular(MPolynomial): - _right = right - - if r.cf.type != n_unknown: -+ if r.cf.type == n_Z: -+ P = parent.change_ring(RationalField()) -+ f = P(self)//P(right) -+ CM = list(f) -+ return parent(sum([c.floor()*m for c,m in CM])) - if _right.is_monomial(): - p = _self._poly - quo = p_ISet(0,r) -- if r != currRing: rChangeCurrRing(r) # pDivide -+ if r != currRing: rChangeCurrRing(r) # pMDivide - while p: - if p_DivisibleBy(_right._poly, p, r): -- temp = pDivide(p, _right._poly) -+ temp = pMDivide(p, _right._poly) - p_SetCoeff0(temp, n_Copy(p_GetCoeff(p, r), r), r) - quo = p_Add_q(quo, temp, r) - p = pNext(p) -@@ -4794,6 +4789,8 @@ cdef class MPolynomial_libsingular(MPolynomial): - sage: p = -x*y + x*z + 54*x - 2 - sage: (5*p^2).lcm(3*p) == 15*p^2 - True -+ sage: lcm(2*x,2*x*y) -+ 2*x*y - """ - cdef ring *_ring = self._parent_ring - cdef poly *ret -@@ -4821,9 +4818,7 @@ cdef class MPolynomial_libsingular(MPolynomial): - if _ring!=currRing: rChangeCurrRing(_ring) # singclap_gcd - gcd = singclap_gcd(p_Copy(self._poly, _ring), p_Copy(_g._poly, _ring), _ring ) - prod = pp_Mult_qq(self._poly, _g._poly, _ring) -- ret = singclap_pdivide(prod , gcd , _ring) -- p_Delete(&prod, _ring) -- p_Delete(&gcd, _ring) -+ ret = p_Divide(prod, gcd, _ring) - if count >= 20: - sig_off() - return new_MP(self._parent, ret) -@@ -4866,7 +4861,7 @@ cdef class MPolynomial_libsingular(MPolynomial): - sage: f.quo_rem(y) - (2*x^2, x + 1) - sage: f.quo_rem(3*x) -- (2*x*y + 1, -4*x^2*y - 2*x + 1) -+ (0, 2*x^2*y + x + 1) - - TESTS:: - -@@ -4888,7 +4883,7 @@ cdef class MPolynomial_libsingular(MPolynomial): - if right.is_zero(): - raise ZeroDivisionError - -- if not self._parent._base.is_field() and not is_IntegerRing(self._parent._base): -+ if not self._parent._base.is_field(): - py_quo = self//right - py_rem = self - right*py_quo - return py_quo, py_rem -diff --git a/src/sage/rings/polynomial/plural.pyx b/src/sage/rings/polynomial/plural.pyx -index d5439f7f08..ad20ebcca0 100644 ---- a/src/sage/rings/polynomial/plural.pyx -+++ b/src/sage/rings/polynomial/plural.pyx -@@ -998,7 +998,7 @@ cdef class NCPolynomialRing_plural(Ring): - if not g._poly: - raise ZeroDivisionError - -- res = pDivide(f._poly,g._poly) -+ res = pMDivide(f._poly,g._poly) - if coeff: - if (r.cf.type == n_unknown) or r.cf.cfDivBy(p_GetCoeff(f._poly, r), p_GetCoeff(g._poly, r), r.cf): - n = r.cf.cfDiv( p_GetCoeff(f._poly, r) , p_GetCoeff(g._poly, r), r.cf) -@@ -1193,7 +1193,7 @@ cdef class NCPolynomialRing_plural(Ring): - if isinstance(g, NCPolynomial_plural) \ - and (g) \ - and p_LmDivisibleBy((g)._poly, m, r): -- flt = pDivide(f._poly, (g)._poly) -+ flt = pMDivide(f._poly, (g)._poly) - #p_SetCoeff(flt, n_Div( p_GetCoeff(f._poly, r) , p_GetCoeff((g)._poly, r), r), r) - p_SetCoeff(flt, n_Init(1, r), r) - return new_NCP(self,flt), g -diff --git a/src/sage/rings/polynomial/polynomial_singular_interface.py b/src/sage/rings/polynomial/polynomial_singular_interface.py -index 9331169f8b..f753610fd3 100644 ---- a/src/sage/rings/polynomial/polynomial_singular_interface.py -+++ b/src/sage/rings/polynomial/polynomial_singular_interface.py -@@ -81,8 +81,8 @@ class PolynomialRing_singular_repr: - sage: R. = PolynomialRing(CC) - sage: singular(R) - polynomial ring, over a field, global ordering -- // coefficients: float[I](complex:15 digits, additional 0 digits)/(I^2+1) -- // number of vars : 2 -+ // coefficients: real[I](complex:15 digits, additional 0 digits)/(I^2+1) -+ // number of vars : 2 - // block 1 : ordering dp - // : names x y - // block 2 : ordering C -@@ -90,8 +90,8 @@ class PolynomialRing_singular_repr: - sage: R. = PolynomialRing(RealField(100)) - sage: singular(R) - polynomial ring, over a field, global ordering -- // coefficients: float -- // number of vars : 2 -+ // coefficients: Float() -+ // number of vars : 2 - // block 1 : ordering dp - // : names x y - // block 2 : ordering C diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 43360f76da69..815242a3b27f 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta1"; + version = "8.4.beta2"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "0yk5ndjr1kap7vhd2i6i5bpcfgmr4fhypn6x7myiymiy9s93d37j"; + sha256 = "1mivhk8xgdsi0xgdbvr8lxik7nmqz434fpyh93bvz50vhsqxgx9p"; }; nixPatches = [ @@ -30,22 +30,6 @@ stdenv.mkDerivation rec { ]; packageUpgradePatches = [ - # matplotlib 2.2.2 deprecated `normed` (replaced by `density`). - # This patch only ignores the warning. It would be equally easy to fix it - # (by replacing all mentions of `normed` by `density`), but its better to - # stay close to sage upstream. I didn't open an upstream ticket about it - # because the matplotlib update also requires a new dependency (kiwisolver) - # and I don't want to invest the time to learn how to add it. - ./patches/matplotlib-normed-deprecated.patch - - # Update to 20171219 broke the doctests because of insignificant precision - # changes, make the doctests less fragile. - # I didn't open an upstream ticket because its not entirely clear if - # 20171219 is really "released" yet. It is listed on the github releases - # page, but not marked as "latest release" and the homepage still links to - # the last version. - ./patches/eclib-regulator-precision.patch - # New glpk version has new warnings, filter those out until upstream sage has found a solution # https://trac.sagemath.org/ticket/24824 ./patches/pari-stackwarn.patch # not actually necessary since tha pari upgrade, but necessary for the glpk patch to apply @@ -60,11 +44,9 @@ stdenv.mkDerivation rec { ./patches/numpy-1.14.3.patch # https://trac.sagemath.org/ticket/25862 + ./patches/eclib-regulator-precision.patch ./patches/eclib-20180710.patch - # https://trac.sagemath.org/ticket/24735 - ./patches/singular-4.1.1p2.patch - # https://trac.sagemath.org/ticket/25567 (fetchpatch { name = "pari-2.11.0.patch"; -- cgit 1.4.1 From 46e653673ec9a78a9b6bfd9d2acd6d2edd685159 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sun, 2 Sep 2018 12:42:44 +0200 Subject: sage: 8.4.beta2 -> 8.4.beta3 --- pkgs/applications/science/math/sage/sage-src.nix | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 815242a3b27f..e7d5c0cbd16a 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta2"; + version = "8.4.beta3"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "1mivhk8xgdsi0xgdbvr8lxik7nmqz434fpyh93bvz50vhsqxgx9p"; + sha256 = "14i2a2dzgcl9wj0067kxy5k1aq4g5yp1mhckghz0qm48ygvp1a4j"; }; nixPatches = [ @@ -43,17 +43,6 @@ stdenv.mkDerivation rec { # https://trac.sagemath.org/ticket/25260 ./patches/numpy-1.14.3.patch - # https://trac.sagemath.org/ticket/25862 - ./patches/eclib-regulator-precision.patch - ./patches/eclib-20180710.patch - - # https://trac.sagemath.org/ticket/25567 - (fetchpatch { - name = "pari-2.11.0.patch"; - url = "https://git.sagemath.org/sage.git/patch/?id=7af4748cab37d651eaa88be501db88f4a5ffc584"; - sha256 = "13f740ly3c19gcmhjngiycvmc3mcfj61y00i6jv0wmfgpm2z3ank"; - }) - # ntl upgrade (fetchpatch { name = "lcalc-c++11.patch"; @@ -64,6 +53,8 @@ stdenv.mkDerivation rec { patches = nixPatches ++ packageUpgradePatches ++ [ ./patches/known-padics-bug.patch + + # /home/timo/tmp/0003-Revert-Something-related-to-the-sphinxbuild-seems-to.patch ]; postPatch = '' -- cgit 1.4.1 From 2a3cbf685bc4a8ce855c38e2be765ada2c1da719 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 3 Sep 2018 23:56:40 +0200 Subject: openblas: fix pkg-config alias name Turns out the filename is important. It should be `cblas`, not `openblas-cblas`. (cherry picked from commit 408eacbc896ecc6d0e25238963ecbd412d78ce3c) --- pkgs/development/libraries/science/math/openblas/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/science/math/openblas/default.nix b/pkgs/development/libraries/science/math/openblas/default.nix index 3f271d015027..2efabcdd05e0 100644 --- a/pkgs/development/libraries/science/math/openblas/default.nix +++ b/pkgs/development/libraries/science/math/openblas/default.nix @@ -140,7 +140,7 @@ stdenv.mkDerivation rec { # Write pkgconfig aliases. Upstream report: # https://github.com/xianyi/OpenBLAS/issues/1740 for alias in blas cblas lapack; do - cat < $out/lib/pkgconfig/openblas-$alias.pc + cat < $out/lib/pkgconfig/$alias.pc Name: $alias Version: ${version} Description: $alias provided by the OpenBLAS package. -- cgit 1.4.1 From 770c5b8a693e4e757c0c41bfdb85b425a088a4fc Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Fri, 7 Sep 2018 20:56:37 +0200 Subject: sage: 8.4.beta3 -> 8.4.beta4 --- pkgs/applications/science/math/sage/sage-src.nix | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 4b8750f92e90..523ef1ceedd0 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta3"; + version = "8.4.beta4"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "14i2a2dzgcl9wj0067kxy5k1aq4g5yp1mhckghz0qm48ygvp1a4j"; + sha256 = "19l5040rx51ygg51lcm78h0q670gcpzkyxys03b3h5ypnq6l4hhf"; }; nixPatches = [ @@ -39,18 +39,6 @@ stdenv.mkDerivation rec { stripLen = 1; }) - (fetchpatch { - name = "matplotlib-2.2.2"; - url = "https://git.sagemath.org/sage.git/patch?id=0d6244ed53b71aba861ce3d683d33e542c0bf0b0"; - sha256 = "15x4cadxxlsdfh2sblgagqjj6ir13fgdzixxnwnvzln60saahb34"; - }) - - (fetchpatch { - name = "scipy-1.1.0"; - url = "https://git.sagemath.org/sage.git/patch?id=e0db968a51678b34ebd8d34906c7042900272378"; - sha256 = "0kq5zxqphhrmavrmg830wdr7hwp1bkzdqlf3jfqfr8r8xq12qwf7"; - }) - # https://trac.sagemath.org/ticket/25260 ./patches/numpy-1.15.1.patch -- cgit 1.4.1 From 12178829079199cef9f577c148cbbcc5404b4c20 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 15 Sep 2018 17:23:14 +0200 Subject: sage: 8.4.beta4 -> 8.4.beta5 --- pkgs/applications/science/math/sage/sage-src.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 523ef1ceedd0..75344172dd87 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta4"; + version = "8.4.beta5"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "19l5040rx51ygg51lcm78h0q670gcpzkyxys03b3h5ypnq6l4hhf"; + sha256 = "0dzmlm7sbqnapmq4k1qz6f49m731rfsclyvrvqnjpp1abbnw2x7b"; }; nixPatches = [ -- cgit 1.4.1 From 0be6ca9e71d64d9ff4af0b15333801ef1fd7a7a5 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 27 Sep 2018 12:08:15 +0200 Subject: sage: 8.4.beta5 -> 8.4.beta6 --- pkgs/applications/science/math/sage/sage-src.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 75344172dd87..fbc4fb89bfd7 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta5"; + version = "8.4.beta6"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "0dzmlm7sbqnapmq4k1qz6f49m731rfsclyvrvqnjpp1abbnw2x7b"; + sha256 = "1fh4xrh0rmlqgsjag24jg5xppkla0y4rp2n7ah5kb9c6d4c7sp8z"; }; nixPatches = [ @@ -48,13 +48,6 @@ stdenv.mkDerivation rec { url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/sagemath-lcalc-c++11.patch?h=packages/sagemath&id=0e31ae526ab7c6b5c0bfacb3f8b1c4fd490035aa"; sha256 = "0p5wnvbx65i7cp0bjyaqgp4rly8xgnk12pqwaq3dqby0j2bk6ijb"; }) - - # https://trac.sagemath.org/ticket/26117 - (fetchpatch { - name = "sympy-1.2.patch"; - url = "https://git.sagemath.org/sage.git/patch?id2=8.4.beta2&id=d94a0a3a3fb4aec05a6f4d95166d90c284f05c36"; - sha256 = "0an2xl1pp3jg36kgg2m1vb7sns7rprk1h3d0qy1gxwdab6i7qnvi"; - }) ]; patches = nixPatches ++ packageUpgradePatches ++ [ -- cgit 1.4.1 From a13eb29485b5f419135b5bd3900126327f6b0825 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 1 Oct 2018 17:38:20 +0200 Subject: sage: 8.4.beta6 -> 8.4.beta7 --- pkgs/applications/science/math/sage/sage-src.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index fbc4fb89bfd7..128f134c1efa 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta6"; + version = "8.4.beta7"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "1fh4xrh0rmlqgsjag24jg5xppkla0y4rp2n7ah5kb9c6d4c7sp8z"; + sha256 = "1cizsfqvcdm02vn01qlww3bf9scmaf2cvz8vf1ynh081wj1s45zq"; }; nixPatches = [ -- cgit 1.4.1 From 27919e06f14211beb6737853edbcb2ae72d152a1 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sun, 7 Oct 2018 12:23:10 +0200 Subject: sage: 8.4.beta7 -> 8.4.rc0 --- pkgs/applications/science/math/sage/sage-src.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 128f134c1efa..f1b7e5767aca 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.beta7"; + version = "8.4.rc0"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "1cizsfqvcdm02vn01qlww3bf9scmaf2cvz8vf1ynh081wj1s45zq"; + sha256 = "01115m0zvr6l33334bwpw7dcc2rdrpyx4mjfxqacfk5sii1zlkmm"; }; nixPatches = [ -- cgit 1.4.1 From f89df0b556a373415e8b1126ffae672dcdbd3567 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 13 Oct 2018 13:27:10 +0200 Subject: sage: 8.4.rc0 -> 8.4.rc1 --- pkgs/applications/science/math/sage/sage-src.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index f1b7e5767aca..e5311a436a07 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.rc0"; + version = "8.4.rc1"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "01115m0zvr6l33334bwpw7dcc2rdrpyx4mjfxqacfk5sii1zlkmm"; + sha256 = "00sbz1bnqncjahs7pk82pqakr0bybin27i7ajhhvyx4a7k523635"; }; nixPatches = [ -- cgit 1.4.1 From 7ca1c31dfa561bf72444e5863ab35367839c2c9c Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Thu, 18 Oct 2018 09:58:36 +0200 Subject: sage: 8.4.rc1 -> 8.4 --- pkgs/applications/science/math/sage/sage-src.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index e5311a436a07..f217a7a0caed 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -3,14 +3,14 @@ , fetchpatch }: stdenv.mkDerivation rec { - version = "8.4.rc1"; + version = "8.4"; name = "sage-src-${version}"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "00sbz1bnqncjahs7pk82pqakr0bybin27i7ajhhvyx4a7k523635"; + sha256 = "0gips1hagiz9m7s21bg5as8hrrm2x5k47h1bsq0pc46iplfwmv2d"; }; nixPatches = [ -- cgit 1.4.1