From 64026f84a7ec2e0279abcb85c69bbb9f296b89d0 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Sun, 23 Oct 2016 21:52:41 -0300 Subject: sagemath-7.4-2.parabola1: updating version --- libre/sagemath/is-package-installed.patch | 80 +++++-------------------------- 1 file changed, 11 insertions(+), 69 deletions(-) (limited to 'libre/sagemath/is-package-installed.patch') diff --git a/libre/sagemath/is-package-installed.patch b/libre/sagemath/is-package-installed.patch index 0f1c59084..000b8cb3e 100644 --- a/libre/sagemath/is-package-installed.patch +++ b/libre/sagemath/is-package-installed.patch @@ -10,7 +10,7 @@ index 0a5f794..2969d92 100644 from sage.env import SAGE_SHARE from sage.misc.all import walltime -@@ -828,7 +827,7 @@ class MiniCremonaDatabase(SQLDatabase): +@@ -824,7 +823,7 @@ class MiniCremonaDatabase(SQLDatabase): if N < self.largest_conductor(): message = "There is no elliptic curve with label " + label \ + " in the database" @@ -19,7 +19,7 @@ index 0a5f794..2969d92 100644 message = "There is no elliptic curve with label " + label \ + " in the currently available databases" else: -@@ -1677,7 +1676,7 @@ def CremonaDatabase(name=None,mini=None,set_global=None): +@@ -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: @@ -103,7 +103,7 @@ 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 -@@ -7856,7 +7856,6 @@ class GenericGraph(GenericGraph_pyx): +@@ -7858,7 +7858,6 @@ class GenericGraph(GenericGraph_pyx): sage: abs(flow_ff-flow_igraph) < 0.00001 # optional python_igraph True """ @@ -111,7 +111,7 @@ index 252984f..ce19682 100644 self._scream_if_not_simple(allow_loops=True) if vertex_bound and algorithm in ["FF", "igraph"]: raise ValueError("This method does not support both " + -@@ -7874,10 +7873,12 @@ class GenericGraph(GenericGraph_pyx): +@@ -7876,10 +7875,12 @@ class GenericGraph(GenericGraph_pyx): if algorithm is None: if vertex_bound: algorithm = "LP" @@ -127,64 +127,6 @@ index 252984f..ce19682 100644 if (algorithm == "FF"): return self._ford_fulkerson(x,y, value_only=value_only, integer=integer, use_edge_labels=use_edge_labels) -@@ -20251,17 +20252,22 @@ class GenericGraph(GenericGraph_pyx): - Subgroup of (Permutation Group with generators [(0,7)(1,4)(2,3)(6,8)]) generated by [(0,7)(1,4)(2,3)(6,8)]] - - """ -- from sage.misc.package import is_package_installed -+ has_bliss=True -+ try: -+ from sage.graphs.bliss import automorphism_group -+ except ImportError: -+ has_bliss=False -+ - if (algorithm == 'bliss' or # explicit choice from the user; or - (algorithm is None and # by default - not edge_labels and -- is_package_installed('bliss'))): -+ has_bliss)): -+ -+ if (not has_bliss): -+ raise NotImplementedError("you need to install bliss or set algorithm=sage to use this command") -+ - if edge_labels: - raise ValueError("bliss cannot be used when edge_labels is True") -- try: -- from sage.graphs.bliss import automorphism_group -- except ImportError: -- raise ImportError("You must install the 'bliss' package to run this command.") - - A = automorphism_group(self, partition) - -@@ -20903,17 +20909,22 @@ class GenericGraph(GenericGraph_pyx): - True - - """ -- from sage.misc.package import is_package_installed -+ has_bliss=True -+ try: -+ from sage.graphs.bliss import canonical_form -+ except ImportError: -+ has_bliss=False -+ - if (algorithm == 'bliss' or # explicit request; or - (algorithm is None and # default choice -- is_package_installed('bliss') and -+ has_bliss and - not edge_labels)): -+ -+ if (not has_bliss): -+ raise NotImplementedError("you need to install bliss or set algorithm=sage to use this command") -+ - if edge_labels: - raise ValueError("bliss cannot be used when edge_labels is True") -- try: -- from sage.graphs.bliss import canonical_form -- except ImportError: -- raise ImportError("You must install the 'bliss' package to run this command.") - return canonical_form(self, partition, return_graph, certify) - - if (algorithm is not None and 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 @@ -270,7 +212,7 @@ 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 -@@ -1396,15 +1396,15 @@ def structure_description(G, latex=False): +@@ -1400,15 +1400,15 @@ def structure_description(G, latex=False): sage: groups.matrix.GL(4,2).structure_description() # optional - database_gap 'A8' """ @@ -285,7 +227,7 @@ index c801636..f43e6d9 100644 description = str(G._gap_().StructureDescription()) except RuntimeError: - if not is_package_installed('database_gap'): -+ if not os.path.isfile(os.path.join(SAGE_LOCAL, "gap", "latest", "small", "readsml.g")): ++ 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 @@ -310,7 +252,7 @@ index e42db61..d4d5684 100644 load_hap() from sage.arith.all import is_prime if not (p == 0 or is_prime(p)): -@@ -1683,9 +1680,7 @@ class PermutationGroup_generic(group.FiniteGroup): +@@ -1682,9 +1679,7 @@ class PermutationGroup_generic(group.FiniteGroup): try: return [Integer(n) for n in self._gap_().IdGroup()] except RuntimeError: @@ -321,7 +263,7 @@ index e42db61..d4d5684 100644 def id(self): """ -@@ -1736,9 +1731,7 @@ class PermutationGroup_generic(group.FiniteGroup): +@@ -1735,9 +1730,7 @@ class PermutationGroup_generic(group.FiniteGroup): try: return Integer(self._gap_().PrimitiveIdentification()) except RuntimeError: @@ -332,7 +274,7 @@ index e42db61..d4d5684 100644 def center(self): """ -@@ -4114,8 +4107,6 @@ class PermutationGroup_generic(group.FiniteGroup): +@@ -4113,8 +4106,6 @@ class PermutationGroup_generic(group.FiniteGroup): - David Joyner and Graham Ellis """ @@ -361,7 +303,7 @@ diff --git a/src/sage/rings/polynomial/multi_polynomial_sequence.py b/src/sage/r index da41cb0..49cae0b 100644 --- a/src/sage/rings/polynomial/multi_polynomial_sequence.py +++ b/src/sage/rings/polynomial/multi_polynomial_sequence.py -@@ -159,7 +159,6 @@ from sage.misc.cachefunc import cached_method +@@ -163,7 +163,6 @@ from sage.misc.cachefunc import cached_method from types import GeneratorType from sage.misc.converting_dict import KeyConvertingDict @@ -369,7 +311,7 @@ index da41cb0..49cae0b 100644 from sage.structure.sequence import Sequence, Sequence_generic -@@ -1429,10 +1428,11 @@ class PolynomialSequence_gf2(PolynomialSequence_generic): +@@ -1433,10 +1432,11 @@ class PolynomialSequence_gf2(PolynomialSequence_generic): if S != []: if algorithm == "exhaustive_search": -- cgit v1.2.3