diff options
author | Antonio Rojas | 2018-10-21 08:50:04 +0000 |
---|---|---|
committer | Antonio Rojas | 2018-10-21 08:50:04 +0000 |
commit | f49b668fbc044f0b7b8eb3a646002738bb6bce52 (patch) | |
tree | 4a39d85688108a57b2b1260fd69e8c00179ae8bd | |
parent | a0714fa9d94ceae7f8a69e511159e96fe62d6d97 (diff) | |
download | aur-f49b668fbc044f0b7b8eb3a646002738bb6bce52.tar.gz |
Sync with [community]
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 33 | ||||
-rw-r--r-- | sagemath-cython-0.29.patch | 65 | ||||
-rw-r--r-- | sagemath-env.patch | 4 | ||||
-rw-r--r-- | sagemath-gap-4.8.patch | 2 | ||||
-rw-r--r-- | sagemath-networkx-2.2.patch | 224 | ||||
-rw-r--r-- | sagemath-python3-notebook.patch | 2 | ||||
-rw-r--r-- | test-optional.patch | 8 |
8 files changed, 333 insertions, 33 deletions
@@ -1,6 +1,6 @@ pkgbase = sagemath-git pkgdesc = Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab - pkgver = 8.4.beta7.r0.ga1bfef8cf3 + pkgver = 8.5.beta0.r0.ga0a5f5992b pkgrel = 1 url = http://www.sagemath.org arch = x86_64 @@ -63,8 +63,11 @@ pkgbase = sagemath-git depends = sage-data-graphs depends = sage-data-polytopes_db depends = sage-data-conway_polynomials + depends = libgiac depends = libhomfly depends = libbraiding + depends = three.js + depends = openblas optdepends = cython2: to compile cython code optdepends = python2-pkgconfig: to compile cython code optdepends = jmol: 3D plots @@ -79,7 +82,6 @@ pkgbase = sagemath-git optdepends = ffmpeg: to export animations to video optdepends = imagemagick: to show animations optdepends = coxeter: Coxeter groups implementation - optdepends = cryptominisat5: SAT solver optdepends = gap-4.8-data: for computing Galois groups optdepends = lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes optdepends = libfes: exhaustive search of solutions for boolean equations @@ -87,11 +89,11 @@ pkgbase = sagemath-git optdepends = latte-integrale: integral point count in polyhedra optdepends = polymake: polymake backend for polyhedral computations optdepends = shared_meataxe: faster matrix arithmetic over finite fields - optdepends = openblas: faster linear algebra optdepends = sirocco: for computing the fundamental group of the complement of a plane curve optdepends = primecount: faster prime_pi implementation - optdepends = three.js: alternative 3D plots engine optdepends = dot2tex: for displaying some diagrams + optdepends = cryptominisat5: SAT solver + optdepends = python2-pycosat: picosat SAT solver optdepends = python2-pip: to install optional packages with sage -pip source = git://git.sagemath.org/sage.git#branch=develop source = sagemath-env.patch @@ -105,18 +107,22 @@ pkgbase = sagemath-git source = sagemath-lcalc-c++11.patch source = sagemath-gap-4.8.patch source = sagemath-sphinx-1.8.patch + source = sagemath-networkx-2.2.patch + source = sagemath-cython-0.29.patch sha256sums = SKIP - sha256sums = f483a448c045aeff186bec4b402da8109fa12547ff36219a9aa427c2561ec8e5 + sha256sums = 6032ec3d0c983e70d4daa1391bc5daa0c948d350f3697932fc2e8472f0778037 sha256sums = 960afe4fcbffe2762b66119b8f14355386ced0d8ee52b535d0dac1dba90d365b sha256sums = ef265f88ceb6caf4aac2d86ea74850861d99a63d11c94fc52b2ce88053c26d1e - sha256sums = fc393ee5fbf507dfb76d6ad0e9193d74a954acb13f35a371bf91e11bbcb08244 - sha256sums = 18edeafb01cc1ed7270c2dfb41a58717918680c98e8eada1858736acd65d92ba + sha256sums = 769fd5a9c377be61de41e1e30004dadb23818da901cceb6e1bece7712ba7cb83 + sha256sums = 3a0ebda1df708f263be830751cc5ddb430ca1f685b25b08d4b6592b65b123ebe sha256sums = 7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94 sha256sums = 4722f9257f7b58a5dc8be2e9163ebba6d7b3ee011ff1ab9c0dbfb1330d367261 sha256sums = 7efb38ba511037feb3abbd88576323320555ba50235ddc7e3d423ca294dd42ed sha256sums = 5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0 - sha256sums = 3d02f6e349213ff4cea6a3acf5e7f8ec11a37b6ead61b338931f07073ebcb36e + sha256sums = 7304d6242bf0e8241d3d83b772d92f00f905c425b894d36a25c264edca279986 sha256sums = 7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee + sha256sums = 0e3436a68cca4165d3d8519a7d4357b1a59515e9e4cc8bd816a852ca4097e274 + sha256sums = d1af7916e21d0a4de7b3ab5d4054c6b3175b84551ea6639a2680e6102c0b990b pkgname = sagemath-git optdepends = cython2: to compile cython code @@ -133,7 +139,6 @@ pkgname = sagemath-git optdepends = ffmpeg: to export animations to video optdepends = imagemagick: to show animations optdepends = coxeter: Coxeter groups implementation - optdepends = cryptominisat5: SAT solver optdepends = gap-4.8-data: for computing Galois groups optdepends = lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes optdepends = libfes: exhaustive search of solutions for boolean equations @@ -141,11 +146,11 @@ pkgname = sagemath-git optdepends = latte-integrale: integral point count in polyhedra optdepends = polymake: polymake backend for polyhedral computations optdepends = shared_meataxe: faster matrix arithmetic over finite fields - optdepends = openblas: faster linear algebra optdepends = sirocco: for computing the fundamental group of the complement of a plane curve optdepends = primecount: faster prime_pi implementation - optdepends = three.js: alternative 3D plots engine optdepends = dot2tex: for displaying some diagrams + optdepends = cryptominisat5: SAT solver + optdepends = python2-pycosat: picosat SAT solver optdepends = python2-pip: to install optional packages with sage -pip optdepends = sagemath-jupyter: Jupyter kernel provides = sagemath @@ -157,5 +162,6 @@ pkgname = sagemath-jupyter-git depends = python2-jupyter_client depends = python2-ipywidgets depends = mathjax + depends = jsmol optdepends = sage-notebook-exporter: convert flask notebooks to Jupyter @@ -4,11 +4,10 @@ # Contributor: Thomas Dziedzic <gostrc at gmail dot com> # Contributor: Osman Ugus <ugus11 at yahoo dot com> # Contributor: Stefan Husmann <stefan-husmann at t-online dot de> -# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD pkgbase=sagemath-git pkgname=(sagemath-git sagemath-jupyter-git) -pkgver=8.4.beta7.r0.ga1bfef8cf3 +pkgver=8.5.beta0.r0.ga0a5f5992b pkgrel=1 pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab" arch=(x86_64) @@ -18,20 +17,20 @@ depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow nauty python2-rp python2-matplotlib python2-scipy python2-sympy python2-networkx python2-pillow python2-future libgap flintqs lcalc lrcalc arb eclib gmp-ecm zn_poly gd python2-cvxopt pynac linbox rubiks pari-galdata pari-seadata-small planarity rankwidth tachyon sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials - libhomfly libbraiding) + libgiac libhomfly libbraiding three.js openblas) optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code' 'jmol: 3D plots' 'sage-notebook: Flask notebook interface (deprecated)' 'sagemath-doc: Documentation and inline help' 'python2-igraph: igraph backend for graph theory' 'coin-or-cbc: COIN backend for numerical computations' 'coin-or-csdp: for computing Lovász theta-function of graphs' 'buckygen: for generating fullerene graphs' 'plantri: for generating some classes of graphs' 'benzene: for generating fusenes and benzenoids' 'ffmpeg: to export animations to video' 'imagemagick: to show animations' - 'coxeter: Coxeter groups implementation' 'cryptominisat5: SAT solver' 'gap-4.8-data: for computing Galois groups' + 'coxeter: Coxeter groups implementation' 'gap-4.8-data: for computing Galois groups' 'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes' 'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations' 'latte-integrale: integral point count in polyhedra' 'polymake: polymake backend for polyhedral computations' - 'shared_meataxe: faster matrix arithmetic over finite fields' 'openblas: faster linear algebra' + 'shared_meataxe: faster matrix arithmetic over finite fields' 'sirocco: for computing the fundamental group of the complement of a plane curve' 'primecount: faster prime_pi implementation' - 'three.js: alternative 3D plots engine' 'dot2tex: for displaying some diagrams' + 'dot2tex: for displaying some diagrams' 'cryptominisat5: SAT solver' 'python2-pycosat: picosat SAT solver' 'python2-pip: to install optional packages with sage -pip') makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc sirocco mcqd coxeter bliss-graphs tdlib python2-pkgconfig shared_meataxe libfes primecount git) @@ -46,19 +45,23 @@ source=(git://git.sagemath.org/sage.git#branch=develop sagemath-cremona.patch sagemath-lcalc-c++11.patch sagemath-gap-4.8.patch - sagemath-sphinx-1.8.patch) + sagemath-sphinx-1.8.patch + sagemath-networkx-2.2.patch + sagemath-cython-0.29.patch) sha256sums=('SKIP' - 'f483a448c045aeff186bec4b402da8109fa12547ff36219a9aa427c2561ec8e5' + '6032ec3d0c983e70d4daa1391bc5daa0c948d350f3697932fc2e8472f0778037' '960afe4fcbffe2762b66119b8f14355386ced0d8ee52b535d0dac1dba90d365b' 'ef265f88ceb6caf4aac2d86ea74850861d99a63d11c94fc52b2ce88053c26d1e' - 'fc393ee5fbf507dfb76d6ad0e9193d74a954acb13f35a371bf91e11bbcb08244' - '18edeafb01cc1ed7270c2dfb41a58717918680c98e8eada1858736acd65d92ba' + '769fd5a9c377be61de41e1e30004dadb23818da901cceb6e1bece7712ba7cb83' + '3a0ebda1df708f263be830751cc5ddb430ca1f685b25b08d4b6592b65b123ebe' '7fcb52e96935dccb0f958d37c2f4e3918392480b9af53e08562f6cba6c68cb94' '4722f9257f7b58a5dc8be2e9163ebba6d7b3ee011ff1ab9c0dbfb1330d367261' '7efb38ba511037feb3abbd88576323320555ba50235ddc7e3d423ca294dd42ed' '5114c912f821900e5bfae1e2cfeb7984de946d0b23e1182b0bf15be1d803dfd0' - '3d02f6e349213ff4cea6a3acf5e7f8ec11a37b6ead61b338931f07073ebcb36e' - '7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee') + '7304d6242bf0e8241d3d83b772d92f00f905c425b894d36a25c264edca279986' + '7dd2ab94fddda8e7c2cdd5250642c4cdd00b7702815d88762fbcd68416bacaee' + '0e3436a68cca4165d3d8519a7d4357b1a59515e9e4cc8bd816a852ca4097e274' + 'd1af7916e21d0a4de7b3ab5d4054c6b3175b84551ea6639a2680e6102c0b990b') pkgver() { cd sage @@ -93,6 +96,10 @@ prepare(){ patch -p1 -i ../fes02.patch # use Features to detect Cremona databases https://trac.sagemath.org/ticket/25825 patch -p1 -i ../sagemath-cremona.patch +# Fix graph generators with networkx 2.2 https://trac.sagemath.org/ticket/26326 + patch -p1 -i ../sagemath-networkx-2.2.patch +# Fix build with cython 0.29 https://trac.sagemath.org/ticket/25292 + patch -p1 -i ../sagemath-cython-0.29.patch # use python2 sed -e 's|sage-python23|python2|' -e 's|#!/usr/bin/env python\b|#!/usr/bin/env python2|' -i src/bin/* @@ -145,7 +152,7 @@ package_sagemath-git() { package_sagemath-jupyter-git() { pkgdesc='Jupyter kernel for SageMath' - depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax) + depends=(sagemath python2-jupyter_client python2-ipywidgets mathjax jsmol) optdepends=('sage-notebook-exporter: convert flask notebooks to Jupyter') cd sage/src diff --git a/sagemath-cython-0.29.patch b/sagemath-cython-0.29.patch new file mode 100644 index 000000000000..e47a724c0996 --- /dev/null +++ b/sagemath-cython-0.29.patch @@ -0,0 +1,65 @@ +diff --git a/src/sage/arith/long.pxd b/src/sage/arith/long.pxd +index b8cc019..c7a1d8e 100644 +--- a/src/sage/arith/long.pxd ++++ b/src/sage/arith/long.pxd +@@ -19,7 +19,7 @@ from cpython.object cimport Py_SIZE + from cpython.int cimport PyInt_AS_LONG + from cpython.long cimport PyLong_AsLong + from cpython.number cimport PyNumber_Index, PyIndex_Check +-from cpython.longintrepr cimport PyLongObject, PyLong_SHIFT, digit ++from cpython.longintrepr cimport py_long, PyLong_SHIFT, digit + + from sage.libs.gmp.mpz cimport mpz_fits_slong_p, mpz_get_si + from sage.rings.integer_fake cimport is_Integer, Integer_AS_MPZ +@@ -208,7 +208,7 @@ cdef inline bint integer_check_long_py(x, long* value, int* err): + return 0 + + # x is a Python "long" (called "int" on Python 3) +- cdef const digit* D = (<PyLongObject*>x).ob_digit ++ cdef const digit* D = (<py_long>x).ob_digit + cdef Py_ssize_t size = Py_SIZE(x) + + # We assume that PyLong_SHIFT is 15 on a 32-bit system and 30 on a +diff --git a/src/sage/libs/gmp/pylong.pyx b/src/sage/libs/gmp/pylong.pyx +index 168e485..9c214f6 100644 +--- a/src/sage/libs/gmp/pylong.pyx ++++ b/src/sage/libs/gmp/pylong.pyx +@@ -28,7 +28,7 @@ AUTHORS: + from cpython.object cimport Py_SIZE + from cpython.int cimport PyInt_FromLong + from cpython.long cimport PyLong_FromLong +-from cpython.longintrepr cimport _PyLong_New, PyLongObject, digit, PyLong_SHIFT ++from cpython.longintrepr cimport _PyLong_New, py_long, digit, PyLong_SHIFT + from .mpz cimport * + + cdef extern from *: +@@ -54,7 +54,7 @@ cdef mpz_get_pylong_large(mpz_srcptr z): + cdef size_t nbits = mpz_sizeinbase(z, 2) + cdef size_t pylong_size = (nbits + PyLong_SHIFT - 1) // PyLong_SHIFT + L = _PyLong_New(pylong_size) +- mpz_export((<PyLongObject*>L).ob_digit, NULL, ++ mpz_export(L.ob_digit, NULL, + -1, sizeof(digit), 0, PyLong_nails, z) + if mpz_sgn(z) < 0: + # Set correct size (use a pointer to hack around Cython's +@@ -91,7 +91,7 @@ cdef int mpz_set_pylong(mpz_ptr z, L) except -1: + if pylong_size < 0: + pylong_size = -pylong_size + mpz_import(z, pylong_size, -1, sizeof(digit), 0, PyLong_nails, +- (<PyLongObject*>L).ob_digit) ++ (<py_long>L).ob_digit) + if Py_SIZE(L) < 0: + mpz_neg(z, z) + +diff --git a/src/setup.py b/src/setup.py +index 6a89cf8..bc8fe12 100755 +--- a/src/setup.py ++++ b/src/setup.py +@@ -284,6 +284,7 @@ class sage_build_cython(Command): + cdivision=True, + embedsignature=True, + fast_getattr=True, ++ language_level="2", + preliminary_late_includes_cy28=True, + profile=self.profile, + ) diff --git a/sagemath-env.patch b/sagemath-env.patch index 5823c4a007ab..3c3a0616e241 100644 --- a/sagemath-env.patch +++ b/sagemath-env.patch @@ -168,5 +168,5 @@ -_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','gap','latest')) +_add_variable_or_fallback('GAP_ROOT_DIR', opj('$SAGE_LOCAL','lib','gap-4.8')) _add_variable_or_fallback('THEBE_DIR', opj('$SAGE_SHARE','thebe')) - - # locate singular shared object + _add_variable_or_fallback('COMBINATORIAL_DESIGN_DATA_DIR', opj('$SAGE_SHARE', 'combinatorial_designs')) + _add_variable_or_fallback('CREMONA_MINI_DATA_DIR', opj('$SAGE_SHARE', 'cremona')) diff --git a/sagemath-gap-4.8.patch b/sagemath-gap-4.8.patch index 5e94e3c113ce..6d0922457f8c 100644 --- a/sagemath-gap-4.8.patch +++ b/sagemath-gap-4.8.patch @@ -2,7 +2,7 @@ diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py index 177fc1b6eb..51c67bdd09 100644 --- a/src/sage/interfaces/gap.py +++ b/src/sage/interfaces/gap.py -@@ -201,7 +201,7 @@ import string +@@ -202,7 +202,7 @@ import string first_try = True diff --git a/sagemath-networkx-2.2.patch b/sagemath-networkx-2.2.patch new file mode 100644 index 000000000000..c9f2e790b51b --- /dev/null +++ b/sagemath-networkx-2.2.patch @@ -0,0 +1,224 @@ +diff --git a/src/sage/graphs/digraph_generators.py b/src/sage/graphs/digraph_generators.py +index d0023e9..a478727 100644 +--- a/src/sage/graphs/digraph_generators.py ++++ b/src/sage/graphs/digraph_generators.py +@@ -1108,7 +1108,7 @@ class DiGraphGenerators(): + + - ``kernel`` - the attachment kernel + +- - ``seed`` - for the random number generator ++ - ``seed`` - a ``random.Random`` seed for the random number generator + + + EXAMPLES:: +@@ -1124,7 +1124,7 @@ class DiGraphGenerators(): + Random Networks, Phys. Rev. E vol. 63 (2001), p. 066123. + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return DiGraph(networkx.gn_graph(n, kernel, seed=seed)) + +@@ -1144,7 +1144,7 @@ class DiGraphGenerators(): + + - ``n`` - number of vertices. + +- - ``seed`` - for the random number generator ++ - ``seed`` - a ``random.Random`` seed for the random number generator + + + EXAMPLES:: +@@ -1160,7 +1160,7 @@ class DiGraphGenerators(): + Copying, Phys. Rev. E vol. 71 (2005), p. 036118. + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return DiGraph(networkx.gnc_graph(n, seed=seed)) + +@@ -1355,7 +1355,7 @@ class DiGraphGenerators(): + + - ``p`` - redirection probability + +- - ``seed`` - for the random number generator. ++ - ``seed`` - a ``random.Random`` seed for the random number generator. + + + EXAMPLES:: +@@ -1371,7 +1371,7 @@ class DiGraphGenerators(): + Random Networks, Phys. Rev. E vol. 63 (2001), p. 066123. + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return DiGraph(networkx.gnc_graph(n, seed=seed)) + +diff --git a/src/sage/graphs/generators/random.py b/src/sage/graphs/generators/random.py +index 06a5203..5b1e3ce 100644 +--- a/src/sage/graphs/generators/random.py ++++ b/src/sage/graphs/generators/random.py +@@ -30,7 +30,7 @@ def RandomGNP(n, p, seed=None, fast=True, algorithm='Sage'): + + - ``p`` -- probability of an edge + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + - ``fast`` -- boolean set to True (default) to use the algorithm with + time complexity in `O(n+m)` proposed in [BatBra2005]_. It is designed +@@ -106,7 +106,7 @@ def RandomGNP(n, p, seed=None, fast=True, algorithm='Sage'): + raise ValueError("The probability p must be in [0..1].") + + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + if p == 1: + from sage.graphs.generators.basic import CompleteGraph + return CompleteGraph(n) +@@ -140,7 +140,7 @@ def RandomBarabasiAlbert(n, m, seed=None): + + - ``m`` - number of edges to attach from each new node + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + EXAMPLES: + +@@ -175,7 +175,7 @@ def RandomBarabasiAlbert(n, m, seed=None): + + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return Graph(networkx.barabasi_albert_graph(n,m,seed=seed)) + +@@ -625,7 +625,7 @@ def RandomGNM(n, m, dense=False, seed=None): + - ``dense`` - whether to use NetworkX's + dense_gnm_random_graph or gnm_random_graph + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + EXAMPLES: We show the edge list of a random graph on 5 nodes with + 10 edges. +@@ -658,7 +658,7 @@ def RandomGNM(n, m, dense=False, seed=None): + sage: G.show() # long time + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + if dense: + return Graph(networkx.dense_gnm_random_graph(n, m, seed=seed)) +@@ -688,7 +688,7 @@ def RandomNewmanWattsStrogatz(n, k, p, seed=None): + - ``p`` - the probability of adding a new edge for + each edge + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + EXAMPLES: We show the edge list of a random graph on 7 nodes with 2 + "nearest neighbors" and probability `p = 0.2`:: +@@ -708,7 +708,7 @@ def RandomNewmanWattsStrogatz(n, k, p, seed=None): + 99, 2566-2572. + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return Graph(networkx.newman_watts_strogatz_graph(n, k, p, seed=seed)) + +@@ -728,7 +728,7 @@ def RandomHolmeKim(n, m, p, seed=None): + - ``p`` - probability of adding a triangle after + adding a random edge. + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + From the NetworkX documentation: The average clustering has a hard + time getting above a certain cutoff that depends on m. This cutoff +@@ -764,7 +764,7 @@ def RandomHolmeKim(n, m, p, seed=None): + with tunable clustering, Phys. Rev. E (2002). vol 65, no 2, 026107. + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return Graph(networkx.powerlaw_cluster_graph(n, m, p, seed=seed)) + +@@ -838,7 +838,7 @@ def RandomLobster(n, p, q, seed=None): + - ``q`` - probability of adding an edge (claw) to the + arms + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + EXAMPLES: We show the edge list of a random graph with 3 backbone + nodes and probabilities `p = 0.7` and `q = 0.3`:: +@@ -852,7 +852,7 @@ def RandomLobster(n, p, q, seed=None): + sage: G.show() # long time + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return Graph(networkx.random_lobster(n, p, q, seed=seed)) + +@@ -943,7 +943,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None): + - ``tries`` - number of attempts to adjust sequence to + make a tree + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + EXAMPLES: We show the edge list of a random graph with 10 nodes and + a power law exponent of 2. +@@ -960,7 +960,7 @@ def RandomTreePowerlaw(n, gamma=3, tries=100, seed=None): + ....: G.show() # random output, long time + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + try: + return Graph(networkx.random_powerlaw_tree(n, gamma, seed=seed, tries=tries)) +@@ -981,7 +981,7 @@ def RandomRegular(d, n, seed=None): + + - ``d`` - degree + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + + EXAMPLES: We show the edge list of a random graph with 8 nodes each +@@ -1009,7 +1009,7 @@ def RandomRegular(d, n, seed=None): + regular graphs quickly. Prob. and Comp. 8 (1999), pp 377-396. + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + try: + N = networkx.random_regular_graph(d, n, seed=seed) +@@ -1034,7 +1034,7 @@ def RandomShell(constructor, seed=None): + - ``d`` - the ratio of inter (next) shell edges to + intra shell edges + +- - ``seed`` -- integer seed for random number generator (default ``None``). ++ - ``seed`` -- a ``random.Random`` seed for random number generator (default ``None``). + + EXAMPLES:: + +@@ -1044,7 +1044,7 @@ def RandomShell(constructor, seed=None): + sage: G.show() # long time + """ + if seed is None: +- seed = current_randstate().long_seed() ++ seed = current_randstate().c_random() + import networkx + return Graph(networkx.random_shell_graph(constructor, seed=seed)) + diff --git a/sagemath-python3-notebook.patch b/sagemath-python3-notebook.patch index 4d93c6921f98..cef38c4fde47 100644 --- a/sagemath-python3-notebook.patch +++ b/sagemath-python3-notebook.patch @@ -16,7 +16,7 @@ diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_ker index 3912b8cdf5..bd40cdadda 100644 --- a/src/sage/repl/ipython_kernel/install.py +++ b/src/sage/repl/ipython_kernel/install.py -@@ -289,7 +289,6 @@ def have_prerequisites(debug=True): +@@ -292,7 +292,6 @@ def have_prerequisites(debug=True): True """ try: diff --git a/test-optional.patch b/test-optional.patch index 891f8181dc02..b04946e7f608 100644 --- a/test-optional.patch +++ b/test-optional.patch @@ -1,10 +1,9 @@ --- src/sage/doctest/control.py.orig 2016-10-20 19:39:53.714618246 +0200 +++ src/sage/doctest/control.py 2016-10-20 19:40:15.158049920 +0200 -@@ -326,24 +326,6 @@ - if "all" in options.optional: +@@ -346,22 +346,6 @@ # Special case to run all optional tests options.optional = True -- else: + else: - # We replace the 'optional' tag by all optional - # packages for which the installed version matches the - # latest available version (this implies in particular @@ -21,7 +20,6 @@ - if not optionaltag_regex.search(o): - raise ValueError('invalid optional tag {!r}'.format(o)) - -- options.optional |= auto_optional_tags + options.optional |= auto_optional_tags self.options = options - self.files = args |