mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 19:55:54 -04:00
gap-pkg-hap is now available
This commit is contained in:
parent
3c5f238a38
commit
61ee655ad9
2 changed files with 15 additions and 44 deletions
|
@ -1,53 +1,23 @@
|
||||||
diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
|
diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
|
||||||
--- src/sage/groups/perm_gps/permgroup.py.orig 2016-08-08 13:39:39.617543700 -0400
|
--- src/sage/groups/perm_gps/permgroup.py.orig 2016-08-20 15:03:27.119562623 -0400
|
||||||
+++ src/sage/groups/perm_gps/permgroup.py 2016-08-08 13:40:16.291545105 -0400
|
+++ src/sage/groups/perm_gps/permgroup.py 2016-08-20 15:05:17.650566855 -0400
|
||||||
@@ -145,7 +145,6 @@ from sage.groups.perm_gps.permgroup_elem
|
@@ -165,6 +165,10 @@ def load_hap():
|
||||||
from sage.groups.abelian_gps.abelian_group import AbelianGroup
|
gap.load_package("hap")
|
||||||
from sage.misc.cachefunc import cached_method
|
except Exception:
|
||||||
from sage.groups.class_function import ClassFunction
|
gap.load_package("hap")
|
||||||
-from sage.misc.package import is_package_installed
|
+ try:
|
||||||
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
|
+ gap.load_package("hap")
|
||||||
from sage.categories.all import FiniteEnumeratedSets
|
+ except Exception:
|
||||||
from sage.groups.conjugacy_classes import ConjugacyClassGAP
|
+ raise RuntimeError("gap-hap package failed to load.")
|
||||||
@@ -190,8 +189,7 @@ def hap_decorator(f):
|
|
||||||
|
def hap_decorator(f):
|
||||||
|
"""
|
||||||
|
@@ -190,8 +194,6 @@ def hap_decorator(f):
|
||||||
"""
|
"""
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapped(self, n, p=0):
|
def wrapped(self, n, p=0):
|
||||||
- if not is_package_installed('gap_packages'):
|
- if not is_package_installed('gap_packages'):
|
||||||
- raise RuntimeError("You must install the optional gap_packages package.")
|
- raise RuntimeError("You must install the optional gap_packages package.")
|
||||||
+ 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)):
|
|
||||||
@@ -1683,9 +1681,7 @@ class PermutationGroup_generic(group.Fin
|
|
||||||
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 database_gap package first.")
|
|
||||||
|
|
||||||
def id(self):
|
|
||||||
"""
|
|
||||||
@@ -1736,9 +1732,7 @@ class PermutationGroup_generic(group.Fin
|
|
||||||
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 database_gap package first.")
|
|
||||||
|
|
||||||
def center(self):
|
|
||||||
"""
|
|
||||||
@@ -4114,8 +4108,7 @@ class PermutationGroup_generic(group.Fin
|
|
||||||
- David Joyner and Graham Ellis
|
|
||||||
|
|
||||||
"""
|
|
||||||
- if not is_package_installed('gap_packages'):
|
|
||||||
- raise RuntimeError("You must install the optional gap_packages package.")
|
|
||||||
+ raise RuntimeError("You must install the optional gap_packages package.")
|
|
||||||
load_hap()
|
load_hap()
|
||||||
from sage.arith.all import is_prime
|
from sage.arith.all import is_prime
|
||||||
if not (p == 0 or is_prime(p)):
|
if not (p == 0 or is_prime(p)):
|
||||||
|
|
|
@ -692,6 +692,7 @@ popd
|
||||||
|
|
||||||
%patch28
|
%patch28
|
||||||
%patch29
|
%patch29
|
||||||
|
|
||||||
%patch30
|
%patch30
|
||||||
%patch31
|
%patch31
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue