From d5388c48f362b3f79053d1ba86de2ff197a4dd81 Mon Sep 17 00:00:00 2001 From: Omar Vega Ramos Date: Fri, 26 May 2017 17:57:04 -0500 Subject: Removing sagemath: This package is in [community] repo --- libre/sagemath/PKGBUILD | 150 ----------- libre/sagemath/cython-sys-path.patch | 10 - libre/sagemath/ecm-7.patch | 79 ------ libre/sagemath/env.patch | 94 ------- libre/sagemath/fes02.patch | 57 ---- libre/sagemath/increase-rtol.patch | 37 --- libre/sagemath/is-package-installed.patch | 328 ------------------------ libre/sagemath/jupyter-path.patch | 22 -- libre/sagemath/latte-count.patch | 84 ------ libre/sagemath/package.patch | 38 --- libre/sagemath/r-no-readline.patch | 11 - libre/sagemath/sagemath-planarity3.patch | 113 -------- libre/sagemath/sagemath-python3-notebook.patch | 27 -- libre/sagemath/sagemath-singular-4.1.0.p2.patch | 33 --- libre/sagemath/skip-check.patch | 22 -- libre/sagemath/test-optional.patch | 25 -- 16 files changed, 1130 deletions(-) delete mode 100644 libre/sagemath/PKGBUILD delete mode 100644 libre/sagemath/cython-sys-path.patch delete mode 100644 libre/sagemath/ecm-7.patch delete mode 100644 libre/sagemath/env.patch delete mode 100644 libre/sagemath/fes02.patch delete mode 100644 libre/sagemath/increase-rtol.patch delete mode 100644 libre/sagemath/is-package-installed.patch delete mode 100644 libre/sagemath/jupyter-path.patch delete mode 100644 libre/sagemath/latte-count.patch delete mode 100644 libre/sagemath/package.patch delete mode 100644 libre/sagemath/r-no-readline.patch delete mode 100644 libre/sagemath/sagemath-planarity3.patch delete mode 100644 libre/sagemath/sagemath-python3-notebook.patch delete mode 100644 libre/sagemath/sagemath-singular-4.1.0.p2.patch delete mode 100644 libre/sagemath/skip-check.patch delete mode 100644 libre/sagemath/test-optional.patch (limited to 'libre') diff --git a/libre/sagemath/PKGBUILD b/libre/sagemath/PKGBUILD deleted file mode 100644 index 32e892716..000000000 --- a/libre/sagemath/PKGBUILD +++ /dev/null @@ -1,150 +0,0 @@ -# $Id: PKGBUILD 219758 2017-03-28 19:08:08Z arojas $ -# Maintainer (Arch): Evgeniy Alekseev -# Maintainer (Arch): Antonio Rojas -# Contributor (Arch): Daniel Wallace -# Contributor (Arch): Thomas Dziedzic -# Contributor (Arch): Osman Ugus -# Contributor (Arch): Stefan Husmann -# Special thanks to Nareto for moving the compile from the .install to the PKGBUILD -# Maintainer: Omar Vega Ramos -# Maintainer: André Silva - -pkgname=sagemath -pkgver=7.6 -pkgrel=2.parabola1 -pkgdesc="Free Mathematics Software, free software replacement of Magma, Maple, Mathematica, and Matlab, without nonfree nauty support" -arch=(i686 x86_64 armv7h) -url="http://www.sagemath.org" -license=(GPL) -depends=(ipython2 ppl palp brial cliquer maxima-ecl gfan sympow python2-rpy2 python2-fpylll python2-psutil - 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 - sage-data-combinatorial_designs sage-data-elliptic_curves sage-data-graphs sage-data-polytopes_db sage-data-conway_polynomials) -optdepends=('cython2: to compile cython code' 'python2-pkgconfig: to compile cython code' - 'jmol: 3D plots' 'sage-notebook: Browser-based (flask) notebook interface' - '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' - 'modular_decomposition: modular decomposition of graphs' 'ffmpeg: to export animations to video' 'imagemagick: to show animations' - 'coxeter3: Coxeter groups implementation' 'cryptominisat2: SAT solver' 'gap-data: for computing Galois groups' - 'lrs: Algorithms for linear reverse search used in game theory and for computing volume of polytopes' - 'libhomfly: for computing the homfly polynomial of links' 'libbraiding: for computing in braid groups' - 'libfes: exhaustive search of solutions for boolean equations' 'python2-pynormaliz: Normaliz backend for polyhedral computations' - 'latte-integrale: integral point count in polyhedra' - 'three.js: alternative 3D plots engine' 'tachyon: alternative 3D plots engine' - 'sagemath-jupyter: Jupyter kernel') -makedepends=(cython2 boost ratpoints symmetrica python2-jinja coin-or-cbc libhomfly libbraiding - mcqd coxeter3 cryptominisat2 modular_decomposition bliss-graphs tdlib python2-pkgconfig meataxe libfes) -conflicts=(sage-mathematics) -replaces=(sage-mathematics) -provides=(sage-mathematics) -source=("$pkgname-$pkgver.tar.gz::https://github.com/sagemath/sage/archive/$pkgver.tar.gz" - env.patch skip-check.patch cython-sys-path.patch is-package-installed.patch package.patch latte-count.patch - jupyter-path.patch sagemath-python3-notebook.patch test-optional.patch ecm-7.patch increase-rtol.patch r-no-readline.patch - sagemath-planarity3.patch fes02.patch sagemath-singular-4.1.0.p2.patch) -sha256sums=('e6e0729ab25446e7c922058db0eee4b0b294b32c196e34842e843ea9fae41423' - '9dba04ff13626a7b6c338a8b18a6c27d343f68a547a218533cf773af3dae6635' - 'b02b3d2d5620ca20f96adb62b6fef05e4676c0a60983310a1450fdf3d923cb04' - 'ff7e034d08ab084fdb193484f7fe3a659ebcd8ab33a2b7177237d65b26de7872' - 'd60fb0fbd27991ce9496ca035a54b03334b5b53f244227a8d6e13f3327ce75d2' - '4a2297e4d9d28f0b3a1f58e1b463e332affcb109eafde44837b1657e309c8212' - 'b816c71d345fb1188c3faa01c4e75cfa04ba6506080231d5d2c303a2288e9b50' - '775051aa9076ebf631c8a291af38b6ec4a13c904740dc9da831641d592d8bcd8' - '27aa73d427d92aeb2c181a233aa3a574a4158cd7dee33832808f69edaec55ea2' - '81d08c6a760f171f3381455b66a6c84789c9f0eefddbe6ca5794075514ad8c3a' - '65ad84c83d5f956fde8eab961f2caad56d64044324c4abc0e56bcd9f44061cb6' - 'be925eefeac3f28e639794ddc20d64e6faafd7181804e29417a510224d19ccc7' - 'ef9f401fa84fe1772af9efee6816643534f2896da4c23b809937b19771bdfbbf' - 'a1c562ebe4538d672404ca3ac2e954a3c955afeb7463f7b4fe6eaa6fa74fe5c7' - 'a39da083c038ada797ffc5bedc9ba47455a3f77057d42f86484ae877ef9172ea' - 'e1912afec58b834fac3b9161c2d5a1794bb618126c6bd7a4be85c834231360e7') - -prepare(){ - cd sage-$pkgver - -# Parabola-specific patches -# assume all optional packages are installed - patch -p0 -i ../package.patch -# set env variables - patch -p0 -i ../env.patch -# skip checking build status - patch -p0 -i ../skip-check.patch -# don't list optional packages when running tests - patch -p0 -i ../test-optional.patch -# set jupyter path - patch -p0 -i ../jupyter-path.patch -# search system paths for cython includes - patch -p1 -i ../cython-sys-path.patch -# fix regressions with ECM 7 - patch -p1 -i ../ecm-7.patch -# increase numerical tolerance, needed by scipy 0.18 - patch -p1 -i ../increase-rtol.patch -# fix freezes in R interface with readline 7 (Debian) - patch -p1 -i ../r-no-readline.patch -# fix build with planarity 3 (Debian) - patch -p2 -i ../sagemath-planarity3.patch -# fix build with Singular 4.1.0-p2 - patch -p0 -i ../sagemath-singular-4.1.0.p2.patch -# use correct latte-count binary name - patch -p1 -i ../latte-count.patch -# make 'sage -notebook=jupyter' work with our python3 jupyter-notebook package - patch -p1 -i ../sagemath-python3-notebook.patch - -# Upstream patches -# fix build against libfes 0.2 http://trac.sagemath.org/ticket/15209 - patch -p1 -i ../fes02.patch -# replace is_package_installed usage http://trac.sagemath.org/ticket/20377 - patch -p1 -i ../is-package-installed.patch - -# use python2 - sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -e 's|exec python|exec python2|' -i src/bin/* - sed -e 's|cython {OPT}|cython2 {OPT}|' -e 's|python setup.py|python2 setup.py|' -i src/sage/misc/cython.py - sed -e 's|exec ipython|exec ipython2|' -e 's|cygdb|cygdb2|g' -i src/bin/sage - sed -e "s|'cython'|'cython2'|" -i src/bin/sage-cython - sed -e 's|bin/python|bin/python2|g' -i src/bin/sage-env -} - - -build() { - cd sage-$pkgver/src - - export SAGE_LOCAL="/usr" - export SAGE_ROOT="$PWD" - export SAGE_SRC="$PWD" - export CC=gcc - - python2 setup.py build -} - -package() { - cd sage-$pkgver/src - - export SAGE_ROOT="$PWD" - export SAGE_LOCAL="/usr" - export JUPYTER_PATH="$pkgdir"/usr/share/jupyter - - python2 setup.py install --root="$pkgdir" --optimize=1 --skip-build - - mkdir -p "$pkgdir"/usr/bin - cp bin/sage "$pkgdir"/usr/bin - for _i in arch-env banner cachegrind callgrind cleaner coverage coverageall cython env eval grep grepdoc inline-fortran ipython \ - massif maxima.lisp native-execute notebook num-threads.py omega open preparse python rst2sws rst2txt run run-cython runtests startuptime.py \ - sws2rst valgrind version.sh - do - cp bin/sage-$_i "$pkgdir"/usr/bin - done - cp bin/math-readline "$pkgdir"/usr/bin - - mkdir -p "$pkgdir"/usr/share/sage - cp -r ext "$pkgdir"/usr/share/sage - -# Create SAGE_SRC, needed for the notebook and help - mkdir "$pkgdir"/usr/share/sage/source - ln -s /usr/share/doc/sage "$pkgdir"/usr/share/sage/source/doc - -# Remove sage_setup - rm -r "$pkgdir"/usr/lib/python2.7/site-packages/sage_setup - -# Split jupyter kernel - rm -r "$pkgdir"/usr/share/jupyter -} diff --git a/libre/sagemath/cython-sys-path.patch b/libre/sagemath/cython-sys-path.patch deleted file mode 100644 index 7ec63e20b..000000000 --- a/libre/sagemath/cython-sys-path.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- sage-7.1/src/setup.py.orig 2016-04-08 16:59:24.691349473 +0000 -+++ sage-7.1/src/setup.py 2016-04-08 17:03:03.847153796 +0000 -@@ -414,6 +414,7 @@ - build_dir=SAGE_CYTHONIZED, - force=force, - aliases=aliases, -+ include_path=sys.path, - compiler_directives={ - 'autotestdict': False, - 'cdivision': True, diff --git a/libre/sagemath/ecm-7.patch b/libre/sagemath/ecm-7.patch deleted file mode 100644 index 617e18d98..000000000 --- a/libre/sagemath/ecm-7.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- a/src/sage/interfaces/ecm.py.orig 2016-05-16 22:18:03.894827738 +0200 -+++ b/src/sage/interfaces/ecm.py 2016-05-16 22:19:14.674904932 +0200 -@@ -140,9 +140,6 @@ - - ``ve`` -- integer `n`. Verbosely show short (`< n` - character) expressions on each loop - -- - ``cofdec`` -- boolean. Force cofactor output in decimal -- (even if expressions are used ) -- - - ``B2scale`` -- integer. Multiplies the default B2 value - - - ``go`` -- integer. Preload with group order val, which can -@@ -395,15 +392,15 @@ - if m is not None: - factor = m.group('factor') - primality = m.group('primality') -- assert primality in ['probable prime', 'composite'] -- result += [(ZZ(factor), primality == 'probable prime')] -+ assert primality in ['prime', 'composite'] -+ result += [(ZZ(factor), primality == 'prime')] - continue # cofactor on the next line - m = self._found_cofactor_re.match(line) - if m is not None: - cofactor = m.group('cofactor') - primality = m.group('primality') -- assert primality in ['Probable prime', 'Composite'] -- result += [(ZZ(cofactor), primality == 'Probable prime')] -+ assert primality in ['Prime', 'Composite'] -+ result += [(ZZ(cofactor), primality == 'Prime')] - # assert len(result) == 2 - return result - raise ValueError('failed to parse ECM output') -@@ -501,7 +498,6 @@ - if factor_digits is not None: - B1 = self.recommended_B1(factor_digits) - kwds['one'] = True -- kwds['cofdec'] = True - cmd = self._make_cmd(B1, None, kwds) - out = self._run_ecm(cmd, n) - return self._parse_output(n, out) -@@ -828,8 +828,8 @@ - Step 1 took 12ms - Step 2 took 17ms - ********** Factor found in step 2: 79792266297612017 --Found probable prime factor of 17 digits: 79792266297612017 --Probable prime cofactor 6366805760909027985741435139224233 has 34 digits -+Found prime factor of 17 digits: 79792266297612017 -+Prime cofactor 6366805760909027985741435139224233 has 34 digits - """ - - TEST_ECM_OUTPUT_2 = """ -@@ -839,8 +839,8 @@ - Step 1 took 2ms - Step 2 took 3ms - ********** Factor found in step 2: 179424673 --Found probable prime factor of 9 digits: 179424673 --Probable prime cofactor 179424673 has 9 digits -+Found prime factor of 9 digits: 179424673 -+Prime cofactor 179424673 has 9 digits - """ - - TEST_ECM_OUTPUT_3 = """ -@@ -858,7 +858,7 @@ - Step 1 took 5ms - Step 2 took 4ms - ********** Factor found in step 2: 197002597249 --Found probable prime factor of 12 digits: 197002597249 -+Found prime factor of 12 digits: 197002597249 - Composite cofactor 339872432034468861533158743041639097889948066859 has 48 digits - """ - -@@ -870,5 +870,5 @@ - Step 2 took 2ms - ********** Factor found in step 2: 265748496095531068869578877937 - Found composite factor of 30 digits: 265748496095531068869578877937 --Probable prime cofactor 251951573867253012259144010843 has 30 digits -+Prime cofactor 251951573867253012259144010843 has 30 digits - """ - diff --git a/libre/sagemath/env.patch b/libre/sagemath/env.patch deleted file mode 100644 index fc37e00db..000000000 --- a/libre/sagemath/env.patch +++ /dev/null @@ -1,94 +0,0 @@ ---- src/bin/sage-env.orig 2015-01-06 10:46:04.469687605 +0100 -+++ src/bin/sage-env 2015-01-06 10:49:59.547762019 +0100 -@@ -110,41 +110,7 @@ - } - - --# New value for SAGE_ROOT: either SAGE_ROOT (if given) --# or a guessed value based on pwd. --if [ -n "$SAGE_ROOT" ]; then -- NEW_SAGE_ROOT="$SAGE_ROOT" --elif [ -f sage -a -d build ]; then -- NEW_SAGE_ROOT="." --elif [ -f ../../sage -a -d ../../build ]; then -- NEW_SAGE_ROOT="../.." --else -- # No idea what SAGE_ROOT should be... -- echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this" -- echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory." -- return 1 --fi -- --# Make NEW_SAGE_ROOT absolute --NEW_SAGE_ROOT=`cd "$NEW_SAGE_ROOT" && pwd -P` -- --# Sanity check NEW_SAGE_ROOT --if [ -f "$NEW_SAGE_ROOT/sage" -a -d "$NEW_SAGE_ROOT/build" ]; then -- : --else -- echo >&2 "Error: SAGE_ROOT is set to a bad value:" -- echo >&2 "SAGE_ROOT=$SAGE_ROOT" -- echo >&2 "You must correct it or erase it and run this script from the SAGE_ROOT" -- echo >&2 "or SAGE_ROOT/local/bin/ directory." -- return 1 --fi -- --# Warn if NEW_SAGE_ROOT does not equal the old SAGE_ROOT --if [ "$SAGE_ROOT" != "$NEW_SAGE_ROOT" -a -n "$SAGE_ROOT" ]; then -- echo >&2 "Warning: overwriting SAGE_ROOT environment variable:" -- echo >&2 "Old SAGE_ROOT=$SAGE_ROOT" -- echo >&2 "New SAGE_ROOT=$NEW_SAGE_ROOT" --fi -+NEW_SAGE_ROOT="/usr" - - # Display the Sage startup banner, used in src/bin/sage - sage_banner() { -@@ -187,7 +187,7 @@ - - # SAGE_LOCAL is the installation prefix and can be customized - if [ -z "$SAGE_LOCAL" ]; then -- export SAGE_LOCAL="$SAGE_ROOT/local" -+ export SAGE_LOCAL="/usr" - fi - - # sage-env must know where the Sage's script files are -@@ -233,8 +233,9 @@ - export SAGE_EXTCODE="$SAGE_SHARE/sage/ext" - export SAGE_SPKG_INST="$SAGE_LOCAL/var/lib/sage/installed" - export SAGE_LOGS="$SAGE_ROOT/logs/pkgs" --export SAGE_SRC="$SAGE_ROOT/src" --export SAGE_DOC_SRC="$SAGE_SRC/doc" -+export GAP_ROOT_DIR="/usr/lib/gap" -+export SAGE_SRC="$SAGE_SHARE/sage/source" -+export SAGE_DOC_SRC="$SAGE_SHARE/doc/sage" - export SAGE_DOC="$SAGE_SHARE/doc/sage" - - if [ -z "${SAGE_ORIG_PATH_SET}" ]; then -@@ -374,6 +337,9 @@ - export SAGE_STARTUP_FILE - fi - -+export LIBMTX="$DOT_SAGE/meataxe" -+[[ -d $LIBMTX ]] || mkdir $LIBMTX # Create meataxe data dir -+ - if [ -z "$IPYTHONDIR" ]; then - # We hardcode a version number in the directory name. The idea is - # that we keep using the same version number as long as that is -@@ -468,7 +400,6 @@ - fi - fi - fi --export MAXIMA_PREFIX="$SAGE_LOCAL" - - PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB - -@@ -629,9 +608,6 @@ - LD_LIBRARY_PATH="$SAGE_LOCAL/bin:$LD_LIBRARY_PATH" && export LD_LIBRARY_PATH - fi - --# See trac 7186 -- this is needed if ecl is moved --ECLDIR="$SAGE_LOCAL/lib/ecl/" && export ECLDIR -- - # Handle parallel building/testing/... - # See Trac Ticket #12016 - # First, figure out the right values for SAGE_NUM_THREADS (default diff --git a/libre/sagemath/fes02.patch b/libre/sagemath/fes02.patch deleted file mode 100644 index 155d114b1..000000000 --- a/libre/sagemath/fes02.patch +++ /dev/null @@ -1,57 +0,0 @@ -From b1f5e3ecc789db674fe17552812f2d0e2ab84be0 Mon Sep 17 00:00:00 2001 -From: Charles Bouillaguet -Date: Thu, 19 Sep 2013 10:31:11 +0200 -Subject: updating the libFES binding to match a change in the interface - ---- - src/sage/libs/fes.pyx | 12 +++++++----- - 1 file changed, 7 insertions(+), 5 deletions(-) - -diff --git a/src/sage/libs/fes.pyx b/src/sage/libs/fes.pyx -index 40b9c23..d188cf0 100644 ---- a/src/sage/libs/fes.pyx -+++ b/src/sage/libs/fes.pyx -@@ -1,17 +1,19 @@ - """ --Binding for the FES library. -+Binding for the libFES library. - - Finding solutions of systems of boolean equations by exhaustive - search, via the fes library. This is usually (much) faster than - computing a Groebner basis, except in special cases where the latter - is particularly easy. - --The FES library is presently only able to deal with polynomials in 64 -+More information is available at [http://www.lifl.fr/~bouillag/fes]. -+ -+The libFES library is presently only able to deal with polynomials in 64 - variables. Performing a full exhaustive search over 64 variables will - take a **long** time. The number of variables can be artificially - reduced to 64 by specializing some of them. - --Note that the FES library **requires** at least of the equations to be -+Note that the libFES library **requires** at least of the equations to be - non-linear. - - AUTHORS: -@@ -71,7 +73,7 @@ from libc.stdint cimport uint64_t - cdef extern from "fes_interface.h": - ctypedef int (*solution_callback_t)(void *, uint64_t) - -- void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose) -+ void exhaustive_search_wrapper(int n, int n_eqs, int degree, int ***coeffs, solution_callback_t callback, void* callback_state, int verbose, int T) - - - include 'sage/ext/interrupt.pxi' #sig_on(), sig_off() -@@ -219,7 +221,7 @@ def exhaustive_search(eqs, max_sols=Infinity, verbose=False): - - # ------- runs the library - sig_on() -- exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, internal_state, verbose) -+ exhaustive_search_wrapper(n, len(eqs), degree, coeffs, report_solution, internal_state, verbose, 0) - sig_off() - - # ------- frees memory occupied by the dense representation of the equations --- -cgit v1.0-1-gd88e - diff --git a/libre/sagemath/increase-rtol.patch b/libre/sagemath/increase-rtol.patch deleted file mode 100644 index dc0ff8799..000000000 --- a/libre/sagemath/increase-rtol.patch +++ /dev/null @@ -1,37 +0,0 @@ -diff -ru sage-7.3.orig/src/sage/coding/code_bounds.py sage-7.3/src/sage/coding/code_bounds.py ---- sage-7.3.orig/src/sage/coding/code_bounds.py 2016-08-05 20:26:10.033204091 +0200 -+++ sage-7.3/src/sage/coding/code_bounds.py 2016-08-05 20:32:27.276579565 +0200 -@@ -554,7 +554,7 @@ - if q < 2: # Here we check that q is actually at least 2 - raise ValueError("The value q must be an integer greater than 1") - -- eps = 4.5e-16 # find_root has about this as the default xtol -+ eps = 4.5e-15 # find_root has about this as the default xtol - ymax = 1 - 1/q - if x <= eps: - return 0 -diff -ru sage-7.3.orig/src/sage/numerical/optimize.py sage-7.3/src/sage/numerical/optimize.py ---- sage-7.3.orig/src/sage/numerical/optimize.py 2016-08-05 20:26:10.816536625 +0200 -+++ sage-7.3/src/sage/numerical/optimize.py 2016-08-05 20:32:21.449907130 +0200 -@@ -15,7 +15,7 @@ - from sage.rings.real_double import RDF - - --def find_root(f, a, b, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False): -+def find_root(f, a, b, xtol=10e-13, rtol=4.5e-15, maxiter=100, full_output=False): - """ - Numerically find a root of ``f`` on the closed interval `[a,b]` - (or `[b,a]`) if possible, where ``f`` is a function in the one variable. -diff -ru sage-7.3.orig/src/sage/symbolic/expression.pyx sage-7.3/src/sage/symbolic/expression.pyx ---- sage-7.3.orig/src/sage/symbolic/expression.pyx 2016-08-05 20:26:11.333202767 +0200 -+++ sage-7.3/src/sage/symbolic/expression.pyx 2016-08-05 20:32:14.236566826 +0200 -@@ -10884,7 +10884,7 @@ - ret = ret[0] - return ret - -- def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-16, maxiter=100, full_output=False): -+ def find_root(self, a, b, var=None, xtol=10e-13, rtol=4.5e-15, maxiter=100, full_output=False): - """ - Numerically find a root of self on the closed interval [a,b] (or - [b,a]) if possible, where self is a function in the one variable. - diff --git a/libre/sagemath/is-package-installed.patch b/libre/sagemath/is-package-installed.patch deleted file mode 100644 index 9a52ac5ff..000000000 --- a/libre/sagemath/is-package-installed.patch +++ /dev/null @@ -1,328 +0,0 @@ -diff --git a/src/sage/databases/cremona.py b/src/sage/databases/cremona.py -index 0a5f794..2969d92 100644 ---- a/src/sage/databases/cremona.py -+++ b/src/sage/databases/cremona.py -@@ -53,7 +53,6 @@ from sage.misc.prandom import randint - - import sage.schemes.elliptic_curves.constructor as elliptic - from .sql_db import SQLDatabase, verify_column --from sage.misc.package import is_package_installed - from sage.env import SAGE_SHARE - from sage.misc.all import walltime - -@@ -824,7 +823,7 @@ class MiniCremonaDatabase(SQLDatabase): - if N < self.largest_conductor(): - message = "There is no elliptic curve with label " + label \ - + " in the database" -- elif is_package_installed('database_cremona_ellcurve'): -+ elif os.path.isfile(os.path.join(SAGE_SHARE, "cremona", "cremona.db")): - message = "There is no elliptic curve with label " + label \ - + " in the currently available databases" - else: -@@ -1673,7 +1672,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None): - if name is None and not set_global: - return _db - if set_global and name is None: -- if is_package_installed('database_cremona_ellcurve'): -+ if os.path.isfile(os.path.join(SAGE_SHARE, "cremona", "cremona.db")): - name = 'cremona' - else: - name = 'cremona mini' -diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py -index b917d2a..80fb20c 100644 ---- a/src/sage/game_theory/normal_form_game.py -+++ b/src/sage/game_theory/normal_form_game.py -@@ -614,8 +614,9 @@ from sage.rings.all import QQ - from sage.structure.sage_object import SageObject - from sage.matrix.constructor import matrix - from sage.matrix.constructor import vector --from sage.misc.package import is_package_installed - from sage.misc.temporary_file import tmp_filename -+import os -+from sage.env import SAGE_LOCAL - - try: - from gambit import Game -@@ -1317,13 +1318,13 @@ class NormalFormGame(SageObject, MutableMapping): - raise ValueError("utilities have not been populated") - - if not algorithm: -- if is_package_installed('lrslib'): -+ if os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'lrs')): - algorithm = "lrs" - else: - algorithm = "enumeration" - - if algorithm == "lrs": -- if not is_package_installed('lrslib'): -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'lrs')): - raise NotImplementedError("lrslib is not installed") - - return self._solve_lrs(maximization) -diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py -index 2f58d8b..eb519a2 100644 ---- a/src/sage/geometry/polyhedron/base.py -+++ b/src/sage/geometry/polyhedron/base.py -@@ -21,7 +21,6 @@ import six - from sage.structure.element import Element, coerce_binop, is_Vector - - from sage.misc.all import cached_method, prod --from sage.misc.package import is_package_installed - - from sage.rings.all import QQ, ZZ - from sage.rings.real_double import RDF -@@ -3691,7 +3690,9 @@ class Polyhedron_base(Element): - - David Avis's lrs program. - """ -- if not is_package_installed('lrslib'): -+ import os -+ from sage.env import SAGE_LOCAL -+ if os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'lrs')) != True: - raise NotImplementedError('You must install the optional lrslib package ' - 'for this function to work') - -diff --git a/src/sage/graphs/generators/classical_geometries.py b/src/sage/graphs/generators/classical_geometries.py -index e80f2a5..04cd9ce 100644 ---- a/src/sage/graphs/generators/classical_geometries.py -+++ b/src/sage/graphs/generators/classical_geometries.py -@@ -1287,10 +1287,9 @@ def CossidentePenttilaGraph(q): - raise ValueError('q(={}) must be an odd prime power'.format(q)) - - from sage.libs.gap.libgap import libgap -- from sage.misc.package import is_package_installed, PackageNotFoundError -+ from sage.interfaces.gap import gap - -- if not is_package_installed('gap_packages'): -- raise PackageNotFoundError('gap_packages') -+ gap.load_package("grape") - - adj_list=libgap.function_factory("""function(q) - local z, e, so, G, nu, G1, G0, B, T, s, O1, O2, x; -diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py -index 252984f..ce19682 100644 ---- a/src/sage/graphs/generic_graph.py -+++ b/src/sage/graphs/generic_graph.py -@@ -7858,7 +7858,6 @@ class GenericGraph(GenericGraph_pyx): - sage: abs(flow_ff-flow_igraph) < 0.00001 # optional python_igraph - True - """ -- from sage.misc.package import is_package_installed - self._scream_if_not_simple(allow_loops=True) - if vertex_bound and algorithm in ["FF", "igraph"]: - raise ValueError("This method does not support both " + -@@ -7876,10 +7875,12 @@ class GenericGraph(GenericGraph_pyx): - if algorithm is None: - if vertex_bound: - algorithm = "LP" -- elif is_package_installed("python_igraph"): -- algorithm = "igraph" - else: -- algorithm = "FF" -+ algorithm = "igraph" -+ try: -+ import igraph -+ except ImportError: -+ algorithm = "FF" - - if (algorithm == "FF"): - return self._ford_fulkerson(x,y, value_only=value_only, integer=integer, use_edge_labels=use_edge_labels) -diff --git a/src/sage/graphs/graph_generators.py b/src/sage/graphs/graph_generators.py -index 5919ab3..1766796 100644 ---- a/src/sage/graphs/graph_generators.py -+++ b/src/sage/graphs/graph_generators.py -@@ -1195,8 +1195,9 @@ class GraphGenerators(): - .. [buckygen] \G. Brinkmann, J. Goedgebeur and B.D. McKay, Generation of Fullerenes, - Journal of Chemical Information and Modeling, 52(11):2910-2918, 2012. - """ -- from sage.misc.package import is_package_installed -- if not is_package_installed("buckygen"): -+ import os -+ from sage.env import SAGE_LOCAL -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'buckygen')): - raise TypeError("the optional buckygen package is not installed") - - # number of vertices should be positive -@@ -1280,8 +1281,9 @@ class GraphGenerators(): - .. [benzene] \G. Brinkmann, G. Caporossi and P. Hansen, A Constructive Enumeration of Fusenes and Benzenoids, - Journal of Algorithms, 45:155-166, 2002. - """ -- from sage.misc.package import is_package_installed -- if not is_package_installed("benzene"): -+ import os -+ from sage.env import SAGE_LOCAL -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'benzene')): - raise TypeError("the optional benzene package is not installed") - - # number of hexagons should be positive -@@ -1433,8 +1435,9 @@ class GraphGenerators(): - .. [plantri] \G. Brinkmann and B.D. McKay, Fast generation of planar graphs, - MATCH-Communications in Mathematical and in Computer Chemistry, 58(2):323-357, 2007. - """ -- from sage.misc.package import is_package_installed -- if not is_package_installed("plantri"): -+ import os -+ from sage.env import SAGE_LOCAL -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'plantri')): - raise TypeError("the optional plantri package is not installed") - - # number of vertices should be positive -@@ -1632,8 +1635,9 @@ class GraphGenerators(): - sage: [g.size() for g in graphs.triangulations(6, minimum_connectivity=3)] # optional plantri - [12, 12] - """ -- from sage.misc.package import is_package_installed -- if not is_package_installed("plantri"): -+ import os -+ from sage.env import SAGE_LOCAL -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'plantri')): - raise TypeError("the optional plantri package is not installed") - - # number of vertices should be positive -@@ -1786,8 +1790,9 @@ class GraphGenerators(): - sage: [len(g) for g in graphs.quadrangulations(12, no_nonfacial_quadrangles=True, dual=True)] # optional plantri - [10, 10] - """ -- from sage.misc.package import is_package_installed -- if not is_package_installed("plantri"): -+ import os -+ from sage.env import SAGE_LOCAL -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'plantri')): - raise TypeError("the optional plantri package is not installed") - - # number of vertices should be positive -diff --git a/src/sage/graphs/lovasz_theta.py b/src/sage/graphs/lovasz_theta.py -index 0d345c9..60948d2 100644 ---- a/src/sage/graphs/lovasz_theta.py -+++ b/src/sage/graphs/lovasz_theta.py -@@ -65,10 +65,9 @@ def lovasz_theta(graph): - from sage.misc.temporary_file import tmp_filename - import os, subprocess - from sage.env import SAGE_LOCAL -- from sage.misc.package import is_package_installed, PackageNotFoundError - -- if not is_package_installed('csdp'): -- raise PackageNotFoundError("csdp") -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, 'bin', 'theta')): -+ raise NotImplementedError("You must install csdp before using this function") - - g = graph.relabel(inplace=False, perm=range(1,n+1)).networkx_graph() - tf_name = tmp_filename() -diff --git a/src/sage/groups/generic.py b/src/sage/groups/generic.py -index c801636..f43e6d9 100644 ---- a/src/sage/groups/generic.py -+++ b/src/sage/groups/generic.py -@@ -1400,15 +1400,15 @@ def structure_description(G, latex=False): - sage: groups.matrix.GL(4,2).structure_description() # optional - database_gap - 'A8' - """ -- import re -- from sage.misc.package import is_package_installed -+ import re, os -+ from sage.env import SAGE_LOCAL - def correct_dihedral_degree(match): - return "%sD%d" % (match.group(1), int(match.group(2))/2) - - try: - description = str(G._gap_().StructureDescription()) - except RuntimeError: -- if not is_package_installed('database_gap'): -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, "lib", "gap", "small", "readsml.g")): - raise RuntimeError("You must install the optional database_gap package first.") - raise - -diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py -index e42db61..d4d5684 100644 ---- a/src/sage/groups/perm_gps/permgroup.py -+++ b/src/sage/groups/perm_gps/permgroup.py -@@ -145,7 +145,6 @@ from sage.groups.perm_gps.permgroup_element import PermutationGroupElement, stan - from sage.groups.abelian_gps.abelian_group import AbelianGroup - from sage.misc.cachefunc import cached_method - from sage.groups.class_function import ClassFunction --from sage.misc.package import is_package_installed - from sage.sets.finite_enumerated_set import FiniteEnumeratedSet - from sage.categories.all import FiniteEnumeratedSets - from sage.groups.conjugacy_classes import ConjugacyClassGAP -@@ -190,8 +189,6 @@ def hap_decorator(f): - """ - @wraps(f) - def wrapped(self, n, p=0): -- if not is_package_installed('gap_packages'): -- raise RuntimeError("You must install the optional gap_packages package.") - load_hap() - from sage.arith.all import is_prime - if not (p == 0 or is_prime(p)): -@@ -1682,9 +1679,7 @@ class PermutationGroup_generic(group.FiniteGroup): - try: - return [Integer(n) for n in self._gap_().IdGroup()] - except RuntimeError: -- if not is_package_installed('database_gap'): -- raise RuntimeError("You must install the optional database_gap package first.") -- raise -+ raise RuntimeError("You must install the optional gap_packages package.") - - def id(self): - """ -@@ -1735,9 +1730,7 @@ class PermutationGroup_generic(group.FiniteGroup): - try: - return Integer(self._gap_().PrimitiveIdentification()) - except RuntimeError: -- if not is_package_installed('database_gap'): -- raise RuntimeError("You must install the optional database_gap package first.") -- raise -+ raise RuntimeError("You must install the optional gap_packages package.") - - def center(self): - """ -@@ -4113,8 +4106,6 @@ class PermutationGroup_generic(group.FiniteGroup): - - David Joyner and Graham Ellis - - """ -- if not is_package_installed('gap_packages'): -- raise RuntimeError("You must install the optional gap_packages package.") - load_hap() - from sage.arith.all import is_prime - if not (p == 0 or is_prime(p)): -diff --git a/src/sage/misc/all.py b/src/sage/misc/all.py -index 90e6985..21daeb0 100644 ---- a/src/sage/misc/all.py -+++ b/src/sage/misc/all.py -@@ -53,10 +53,6 @@ from fpickle import pickle_function, unpickle_function - - from .dist import install_scripts - --from .package import (installed_packages, is_package_installed, -- standard_packages, optional_packages, experimental_packages, -- package_versions) -- - from .pager import pager - - lazy_import('sage.misc.sagedoc', ['browse_sage_doc', -diff --git a/src/sage/rings/polynomial/multi_polynomial_sequence.py b/src/sage/rings/polynomial/multi_polynomial_sequence.py -index da41cb0..49cae0b 100644 ---- a/src/sage/rings/polynomial/multi_polynomial_sequence.py -+++ b/src/sage/rings/polynomial/multi_polynomial_sequence.py -@@ -163,7 +163,6 @@ from sage.misc.cachefunc import cached_method - - from types import GeneratorType - from sage.misc.converting_dict import KeyConvertingDict --from sage.misc.package import is_package_installed - - from sage.structure.sequence import Sequence, Sequence_generic - -@@ -1433,10 +1432,11 @@ class PolynomialSequence_gf2(PolynomialSequence_generic): - - if S != []: - if algorithm == "exhaustive_search": -- if not is_package_installed('fes'): -- from sage.misc.package import PackageNotFoundError -- raise PackageNotFoundError("fes") -- from sage.libs.fes import exhaustive_search -+ try: -+ from sage.libs.fes import exhaustive_search -+ except ImportError: -+ raise RuntimeError("You must install the optional fes package.") -+ - solutions = exhaustive_search(S, max_sols=n, verbose=verbose, **kwds) - - elif algorithm == "polybori": diff --git a/libre/sagemath/jupyter-path.patch b/libre/sagemath/jupyter-path.patch deleted file mode 100644 index 3eec99a89..000000000 --- a/libre/sagemath/jupyter-path.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/sage/repl/ipython_kernel/install.py.orig 2015-10-23 19:23:39.728456590 +0000 -+++ src/sage/repl/ipython_kernel/install.py 2015-10-23 19:24:00.965018978 +0000 -@@ -13,8 +13,7 @@ - SAGE_ROOT, SAGE_DOC, SAGE_LOCAL, SAGE_EXTCODE, - SAGE_VERSION - ) --from jupyter_core.paths import ENV_JUPYTER_PATH --JUPYTER_PATH = ENV_JUPYTER_PATH[0] -+JUPYTER_PATH = os.environ.get('JUPYTER_PATH') - - class SageKernelSpec(object): - -@@ -208,7 +208,7 @@ - sage: spec._symlink_resources() # not tested - """ - path = os.path.join(SAGE_EXTCODE, 'notebook-ipython') -- for filename in os.listdir(path): -+ for filename in os.listdir('ext/notebook-ipython'): - self.symlink( - os.path.join(path, filename), - os.path.join(self.kernel_dir, filename) - diff --git a/libre/sagemath/latte-count.patch b/libre/sagemath/latte-count.patch deleted file mode 100644 index 623259294..000000000 --- a/libre/sagemath/latte-count.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py -index 50d99f99e4..3a3a8cb214 100644 ---- a/src/sage/geometry/polyhedron/base.py -+++ b/src/sage/geometry/polyhedron/base.py -@@ -4629,7 +4629,7 @@ class Polyhedron_base(Element): - ... - RuntimeError: LattE integrale program failed (exit code 1): - ... -- Invocation: count '--redundancy-check=none' --cdd /dev/stdin -+ Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin - ... - Parse error in CDD-style input file /dev/stdin - sage: Q.integral_points_count(verbose=True) # optional - latte_int -diff --git a/src/sage/geometry/polyhedron/base_ZZ.py b/src/sage/geometry/polyhedron/base_ZZ.py -index 268af9db0d..70d41dfa30 100644 ---- a/src/sage/geometry/polyhedron/base_ZZ.py -+++ b/src/sage/geometry/polyhedron/base_ZZ.py -@@ -228,7 +228,7 @@ class Polyhedron_ZZ(Polyhedron_base): - sage: p = P.ehrhart_polynomial(maxdet=5, verbose=True) # optional - latte_int - This is LattE integrale ... - ... -- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin -+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--maxdet=5' /dev/stdin - ... - sage: p # optional - latte_int - 1/2*t^2 + 3/2*t + 1 -@@ -236,7 +236,7 @@ class Polyhedron_ZZ(Polyhedron_base): - sage: p = P.ehrhart_polynomial(dual=True, verbose=True) # optional - latte_int - This is LattE integrale ... - ... -- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin -+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --dual /dev/stdin - ... - sage: p # optional - latte_int - 1/2*t^2 + 3/2*t + 1 -@@ -244,7 +244,7 @@ class Polyhedron_ZZ(Polyhedron_base): - sage: p = P.ehrhart_polynomial(irrational_primal=True, verbose=True) # optional - latte_int - This is LattE integrale ... - ... -- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin -+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-primal /dev/stdin - ... - sage: p # optional - latte_int - 1/2*t^2 + 3/2*t + 1 -@@ -252,7 +252,7 @@ class Polyhedron_ZZ(Polyhedron_base): - sage: p = P.ehrhart_polynomial(irrational_all_primal=True, verbose=True) # optional - latte_int - This is LattE integrale ... - ... -- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin -+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd --irrational-all-primal /dev/stdin - ... - sage: p # optional - latte_int - 1/2*t^2 + 3/2*t + 1 -@@ -264,7 +264,7 @@ class Polyhedron_ZZ(Polyhedron_base): - ... - RuntimeError: LattE integrale program failed (exit code 1): - ... -- Invocation: count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin -+ Invocation: latte-count --ehrhart-polynomial '--redundancy-check=none' --cdd '--bim-bam-boum=19' /dev/stdin - Unknown command/option --bim-bam-boum=19 - """ - if self.is_empty(): -diff --git a/src/sage/interfaces/latte.py b/src/sage/interfaces/latte.py -index 066cedd401..302b39910d 100644 ---- a/src/sage/interfaces/latte.py -+++ b/src/sage/interfaces/latte.py -@@ -86,7 +86,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False, - sage: n = count(cddin, cdd=True, verbose=True, raw_output=True) # optional - latte_int - This is LattE integrale ... - ... -- Invocation: count '--redundancy-check=none' --cdd /dev/stdin -+ Invocation: latte-count '--redundancy-check=none' --cdd /dev/stdin - ... - Total Unimodular Cones: ... - Maximum number of simplicial cones in memory at once: ... -@@ -106,7 +106,7 @@ def count(arg, ehrhart_polynomial=False, multivariate_generating_function=False, - from sage.misc.misc import SAGE_TMP - from sage.rings.integer import Integer - -- args = ['count'] -+ args = ['latte-count'] - if ehrhart_polynomial and multivariate_generating_function: - raise ValueError - if ehrhart_polynomial: diff --git a/libre/sagemath/package.patch b/libre/sagemath/package.patch deleted file mode 100644 index 0139f4b15..000000000 --- a/libre/sagemath/package.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- src/sage/misc/package.py.orig 2014-11-23 15:58:13.000000000 +0100 -+++ src/sage/misc/package.py 2015-01-22 20:32:25.651383902 +0100 -@@ -343,7 +343,7 @@ - sage: for pkg in list_packages('pip', local=True): - ....: assert not is_package_installed(pkg) - """ -- return any(p.split('-')[0] == package for p in installed_packages(exclude_pip)) -+ return True - - def package_versions(package_type, local=False): - r""" ---- src/sage_setup/optional_extension.py.orig 2016-10-19 18:35:10.092577510 +0000 -+++ src/sage_setup/optional_extension.py 2016-10-19 18:38:13.514765366 +0000 -@@ -21,8 +21,6 @@ - from distutils.extension import Extension - from sage.misc.package import is_package_installed, list_packages - --all_packages = list_packages(local=True) -- - - class CythonizeExtension(Extension): - """ -@@ -76,14 +74,7 @@ - condition = kwds.pop("condition") - except KeyError: - pkg = kwds.pop("package") -- try: -- pkginfo = all_packages[pkg] -- except KeyError: -- # Might be an installed old-style package -- condition = is_package_installed(pkg) -- else: -- condition = (pkginfo["installed_version"] == pkginfo["remote_version"]) -- -+ condition = True - if condition: - return Extension(*args, **kwds) - else: diff --git a/libre/sagemath/r-no-readline.patch b/libre/sagemath/r-no-readline.patch deleted file mode 100644 index 001d34f65..000000000 --- a/libre/sagemath/r-no-readline.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/sage/interfaces/r.py -+++ b/src/sage/interfaces/r.py -@@ -331,7 +331,7 @@ - prompt = '> ', #default, later comes the change - - # This is the command that starts up your program -- command = "R --vanilla --quiet", -+ command = "R --no-readline --vanilla --quiet", - - server=server, - server_tmpdir=server_tmpdir, diff --git a/libre/sagemath/sagemath-planarity3.patch b/libre/sagemath/sagemath-planarity3.patch deleted file mode 100644 index 607600879..000000000 --- a/libre/sagemath/sagemath-planarity3.patch +++ /dev/null @@ -1,113 +0,0 @@ -Author: Ximin Luo -Bug: https://trac.sagemath.org/ticket/21774 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/sage/src/sage/graphs/planarity.pyx -+++ b/sage/src/sage/graphs/planarity.pyx -@@ -3,13 +3,19 @@ - """ - - cdef extern from "planarity/graph.h": -- ctypedef struct graphNode: -- int v -+ ctypedef struct vertexRec: - int link[2] -- ctypedef graphNode * graphNodeP -+ int index -+ ctypedef vertexRec * vertexRecP -+ -+ ctypedef struct edgeRec: -+ int link[2] -+ int neighbor -+ ctypedef edgeRec * edgeRecP - - ctypedef struct BM_graph: -- graphNodeP G -+ vertexRecP V -+ edgeRecP E - int N - ctypedef BM_graph * graphP - -@@ -93,15 +99,16 @@ - g._pos = { u: [0,0], v: [0,1] } - return (True, None) if kuratowski else True - -- # create to and from mappings to relabel vertices to the set {0,...,n-1} -+ # create to and from mappings to relabel vertices to the set {1,...,n} -+ # (planarity 3 uses 1-based array indexing, with 0 representing NIL) - cdef int i - listto = g.vertices() - ffrom = {} - for vvv in listto: -- ffrom[vvv] = listto.index(vvv) -+ ffrom[vvv] = listto.index(vvv) + 1 - to = {} - for i from 0 <= i < len(listto): -- to[i] = listto[i] -+ to[i + 1] = listto[i] - g.relabel(ffrom) - - cdef graphP theGraph -@@ -125,7 +132,7 @@ - status = gp_Embed(theGraph, EMBEDFLAGS_PLANAR) - gp_SortVertices(theGraph) - -- # use to and from mappings to relabel vertices back from the set {0,...,n-1} -+ # use to and from mappings to relabel vertices back from the set {1,...,n} - g.relabel(to) - - if status == NOTOK: -@@ -134,12 +141,12 @@ - # Kuratowski subgraph isolator - g_dict = {} - from sage.graphs.graph import Graph -- for i from 0 <= i < theGraph.N: -+ for i from 0 < i <= theGraph.N: - linked_list = [] -- j = theGraph.G[i].link[1] -- while j >= theGraph.N: -- linked_list.append(to[theGraph.G[j].v]) -- j = theGraph.G[j].link[1] -+ j = theGraph.V[i].link[1] -+ while j: -+ linked_list.append(to[theGraph.E[j].neighbor]) -+ j = theGraph.E[j].link[1] - if len(linked_list) > 0: - g_dict[to[i]] = linked_list - G = Graph(g_dict) -@@ -153,12 +160,12 @@ - if set_embedding: - emb_dict = {} - #for i in range(theGraph.N): -- for i from 0 <= i < theGraph.N: -+ for i from 0 < i <= theGraph.N: - linked_list = [] -- j = theGraph.G[i].link[1] -- while j >= theGraph.N: -- linked_list.append(to[theGraph.G[j].v]) -- j = theGraph.G[j].link[1] -+ j = theGraph.V[i].link[1] -+ while j: -+ linked_list.append(to[theGraph.E[j].neighbor]) -+ j = theGraph.E[j].link[1] - emb_dict[to[i]] = linked_list - g._embedding = emb_dict - if set_pos: -@@ -174,12 +181,12 @@ - - emb_dict = {} - #for i in range(theGraph.N): -- for i from 0 <= i < theGraph.N: -+ for i from 0 < i <= theGraph.N: - linked_list = [] -- j = theGraph.G[i].link[0] -- while j >= theGraph.N: -- linked_list.append(to[theGraph.G[j].v]) -- j = theGraph.G[j].link[0] -+ j = theGraph.V[i].link[0] -+ while j: -+ linked_list.append(to[theGraph.E[j].neighbor]) -+ j = theGraph.E[j].link[0] - emb_dict[to[i]] = linked_list - g._embedding = emb_dict - gp_Free(&theGraph) diff --git a/libre/sagemath/sagemath-python3-notebook.patch b/libre/sagemath/sagemath-python3-notebook.patch deleted file mode 100644 index cae225615..000000000 --- a/libre/sagemath/sagemath-python3-notebook.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook -index 74192da240..0ede281aad 100755 ---- a/src/bin/sage-notebook -+++ b/src/bin/sage-notebook -@@ -96,8 +96,7 @@ class NotebookJupyter(object): - if not have_prerequisites(): - print(self.PREREQUISITE_ERROR) - raise SystemExit(1) -- from notebook.notebookapp import main -- main(argv) -+ os.execvp('jupyter-notebook', ['jupyter-notebook'] + argv) - - - class SageNBExport(NotebookJupyter): -diff --git a/src/sage/repl/ipython_kernel/install.py b/src/sage/repl/ipython_kernel/install.py -index 3912b8cdf5..bd40cdadda 100644 ---- a/src/sage/repl/ipython_kernel/install.py -+++ b/src/sage/repl/ipython_kernel/install.py -@@ -281,7 +281,6 @@ def have_prerequisites(debug=True): - True - """ - try: -- from notebook.notebookapp import NotebookApp - return True - except ImportError: - if debug: - diff --git a/libre/sagemath/sagemath-singular-4.1.0.p2.patch b/libre/sagemath/sagemath-singular-4.1.0.p2.patch deleted file mode 100644 index b1a74a091..000000000 --- a/libre/sagemath/sagemath-singular-4.1.0.p2.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- src/sage/libs/singular/decl.pxd.orig 2017-02-21 07:58:27.088118954 +0000 -+++ src/sage/libs/singular/decl.pxd 2017-02-21 07:59:01.794846500 +0000 -@@ -484,8 +484,8 @@ - - ring *rDefault(int char , int nvars, char **names) - ring *rDefault(const n_Procs_s* cf, int nvars, char **names) -- ring *rDefault(int ch , int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl) -- ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, int *ord, int *block0, int *block1, int **wvhdl) -+ ring *rDefault(int ch , int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl) -+ ring *rDefault(const n_Procs_s* cf, int nvars, char **names,int ord_size, rRingOrder_t *ord, int *block0, int *block1, int **wvhdl) - - - ---- src/sage/libs/singular/ring.pyx.orig 2017-02-21 07:24:23.197906897 +0000 -+++ src/sage/libs/singular/ring.pyx 2017-02-21 07:29:23.731763098 +0000 -@@ -21,7 +21,7 @@ - from sage.libs.singular.decl cimport number, poly, ring, currRing - from sage.libs.singular.decl cimport rChangeCurrRing, rCopy0, rComplete, rDelete, idInit - from sage.libs.singular.decl cimport omAlloc0, omStrDup, omAlloc, omAlloc0Bin, sip_sring_bin, rnumber_bin --from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a -+from sage.libs.singular.decl cimport ringorder_dp, ringorder_Dp, ringorder_lp, ringorder_rp, ringorder_ds, ringorder_Ds, ringorder_ls, ringorder_M, ringorder_C, ringorder_wp, ringorder_Wp, ringorder_ws, ringorder_Ws, ringorder_a, rRingOrder_t - from sage.libs.singular.decl cimport p_Copy, prCopyR - from sage.libs.singular.decl cimport n_unknown, n_Zp, n_Q, n_R, n_GF, n_long_R, n_algExt,n_transExt,n_long_C, n_Z, n_Zn, n_Znm, n_Z2m, n_CF - from sage.libs.singular.decl cimport n_coeffType, cfInitCharProc -@@ -165,7 +165,7 @@ - ## q q : GF(q=p^n) *names TRUE (todo) - - _wvhdl = omAlloc0((nblcks + 2) * sizeof(int *)) -- _order = omAlloc0((nblcks + 2) * sizeof(int)) -+ _order = omAlloc0((nblcks + 2) * sizeof(int)) - _block0 = omAlloc0((nblcks + 2) * sizeof(int)) - _block1 = omAlloc0((nblcks + 2) * sizeof(int)) - diff --git a/libre/sagemath/skip-check.patch b/libre/sagemath/skip-check.patch deleted file mode 100644 index 48cac24b7..000000000 --- a/libre/sagemath/skip-check.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/bin/sage.orig 2014-12-18 09:47:27.354829070 +0100 -+++ src/bin/sage 2014-12-18 09:48:00.041563401 +0100 -@@ -352,18 +352,6 @@ - - # Prepare for running Sage, either interactively or non-interactively. - sage_setup() { -- # Check that we're not in a source tarball which hasn't been built yet (#13561). -- if [ ! -d "$SAGE_LOCAL/lib/python/site-packages/sage" ]; then -- echo >&2 '************************************************************************' -- echo >&2 'It seems that you are attempting to run Sage from an unpacked source' -- echo >&2 'tarball, but you have not compiled it yet (or maybe the build has not' -- echo >&2 'finished). You should run `make` in the Sage root directory first.' -- echo >&2 'If you did not intend to build Sage from source, you should download' -- echo >&2 'a binary tarball instead. Read README.txt for more information.' -- echo >&2 '************************************************************************' -- exit 1 -- fi -- - # Display the startup banner (unless SAGE_BANNER is explictly "no") - if [ "$SAGE_BANNER" != "no" ]; then - # can be 'bare', or 'yes', or unspecified - diff --git a/libre/sagemath/test-optional.patch b/libre/sagemath/test-optional.patch deleted file mode 100644 index 1918cbe5d..000000000 --- a/libre/sagemath/test-optional.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- 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 -@@ -307,22 +307,6 @@ - if "all" in options.optional: - # Special case to run all optional tests - options.optional = True -- else: -- # We replace the 'optional' tag by all optional -- # packages for which the installed version matches the -- # latest available version (this implies in particular -- # that the package is actually installed). -- if 'optional' in options.optional: -- options.optional.discard('optional') -- from sage.misc.package import list_packages -- for pkg in list_packages('optional', local=True).values(): -- if pkg['installed_version'] == pkg['remote_version']: -- options.optional.add(pkg['name']) -- -- # Check that all tags are valid -- for o in options.optional: -- if not optionaltag_regex.search(o): -- raise ValueError('invalid optional tag {!r}'.format(o)) - - self.options = options - self.files = args -- cgit v1.2.3