Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the system GAP #36792

Merged
merged 64 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
c17f3dd
src/sage/env.py: replace GAP_{LIB,SHARE}_DIR
orlitzky Nov 27, 2023
a69735d
src/sage/libs/gap/util.pyx: replace GAP_{LIB,SHARE}_DIR
orlitzky Nov 27, 2023
2977c7c
src/sage/libs/gap/saved_workspace.py: replace GAP_LIB_DIR
orlitzky Nov 27, 2023
63275c2
src/sage/interfaces/gap_workspace.py: replace GAP_{LIB,SHARE}_DIR
orlitzky Nov 27, 2023
e9ba01e
pkgs/sage-conf: add GAP_ROOT_PATHS variable
orlitzky Nov 28, 2023
667fe19
build/pkgs/gap/spkg-configure.m4: use the system GAP if possible
orlitzky Nov 27, 2023
0e33abe
src/sage/env.py: don't pass -r to gap
orlitzky Nov 27, 2023
4854de7
src/sage/env.py: combine GAP_{LIB,SHARE}_DIR into GAP_ROOT_PATHS
orlitzky Nov 27, 2023
d41553b
src/sage/env.py: pass GAP_ROOT_PATHS via -l to GAP
orlitzky Nov 27, 2023
6b45fec
src/sage/env.py: pass -A to the gap command
orlitzky Nov 27, 2023
47bd80e
src/sage/libs/gap/util.pyx: initialize libgap with -A
orlitzky Nov 27, 2023
1ee0a17
src/sage/ext_data/gap/sage.g: load PolyCyclic if possible
orlitzky Nov 27, 2023
2a64023
src/sage/libs/gap/sage.gaprc: load PolyCyclic if possible
orlitzky Nov 27, 2023
2b33f4e
build/pkgs/gap{,_packages}: make most GAP packages optional
orlitzky Nov 27, 2023
e59cb7f
src/sage/features/{__init__,gap}.py: unloaded packages aren't present
orlitzky Nov 27, 2023
c6da035
src/sage/features/gap.py: don't cache GAP package tests
orlitzky Nov 27, 2023
de9e840
src/sage/groups/abelian_gps/abelian_group_morphism.py: add optional tags
orlitzky Nov 28, 2023
ce73f41
src/sage/modular/arithgroup/congroup_gamma{0,H}.py: add optional tags
orlitzky Nov 28, 2023
a8b7273
src/sage/tests/books/judson-abstract-algebra/cyclic-sage.py: add opti…
orlitzky Nov 28, 2023
2e88e0b
src/sage/tests/gap_packages.py: change two example package names
orlitzky Nov 28, 2023
e3d5c4d
src/sage/rings/finite_rings/integer_mod_ring.py: add optional tags
orlitzky Nov 28, 2023
19a3e86
src/sage/rings/number_field/number_field.py: add optional tags
orlitzky Nov 28, 2023
673b8bc
src/sage/features/__init__.py: update PolyCyclic unhide() example
orlitzky Nov 28, 2023
79fe294
src/sage/groups/abelian_gps/abelian_group.py: add optional tags
orlitzky Nov 28, 2023
36de32a
src/sage/groups/perm_gps/permgroup.py: fix failing socle() test
orlitzky Nov 29, 2023
5cfff86
src/bin/sage: pass -A to gap in "sage --gap"
orlitzky Nov 29, 2023
449922c
src/doc/en/prep/Quickstarts/Abstract-Algebra.rst: sort doctest output
orlitzky Nov 29, 2023
e85e17c
src/doc/en/constructions/groups.rst: sort doctest output
orlitzky Nov 29, 2023
9cfb1d7
src/sage/tests/gap_packages.py: deduplicate the list of gap root paths
orlitzky Nov 29, 2023
46a091b
src/sage/graphs/generators/families.py: remove unpredictable doctest
orlitzky Nov 30, 2023
d93cfda
build/pkgs/gap_packages/SPKG.rst: document the autoloading behavior
orlitzky Nov 30, 2023
b53e1d7
src/sage/features: fix two gap_packages tests
orlitzky Nov 30, 2023
6c98252
pkgs/sage-conf: fix logic error in the GAP_ROOT_PATHS comment
orlitzky Nov 30, 2023
b86fd78
pkgs/sage-conf: prefer SAGE_LOCAL/share to SAGE_SHARE
orlitzky Nov 30, 2023
6405814
src/sage/env.py: prefer SAGE_LOCAL/share to SAGE_SHARE
orlitzky Nov 30, 2023
29c06cb
src/sage/features/gap.py: delete a blank line (pycodestyle)
orlitzky Nov 30, 2023
62bfa19
build/pkgs/gap_packages/SPKG.rst: add optional tags and output
orlitzky Nov 30, 2023
3fcc480
build/pkgs/gap/spkg-configure.m4: rework GAP_ROOT_PATHS handling
orlitzky Dec 1, 2023
d976d95
pkgs/sage-conf: add '${prefix}' magic for GAP_ROOT_PATHS
orlitzky Dec 1, 2023
9385493
src/sage/env.py: don't mangle GAP_ROOT_PATHS
orlitzky Dec 1, 2023
8bd6f28
build/pkgs/gap/spkg-configure.m4: rename GAPC to GAPRUN
orlitzky Dec 1, 2023
ec1c782
src/sage/tests/gap_packages.py: update GAP_ROOT_PATHS comment
orlitzky Dec 1, 2023
2e29883
build/pkgs/gap{,_packages}: bring autoloaded packages back into gap
orlitzky Dec 1, 2023
1e3f4fc
src/sage/ext_data/gap/sage.g: autoload more packages
orlitzky Dec 1, 2023
773ec33
src/sage/libs/gap/sage.gaprc: autoload more packages
orlitzky Dec 1, 2023
76b56cd
build/pkgs/gap/spkg-configure.m4: add a comment about GAP packages
orlitzky Dec 1, 2023
19d44ff
src/sage/env.py: move gap_cmd handling to src/sage/interfaces/gap.py
orlitzky Dec 1, 2023
76dd352
src/doc/en/prep/Quickstarts/Abstract-Algebra.rst: don't list subgroups
orlitzky Dec 1, 2023
27643f8
src/sage/groups/matrix_gps/finitely_generated_gap.py: fix a GAP doctest
orlitzky Dec 1, 2023
c824a8b
build/pkgs/gap/spkg-configure.m4: try to link against libgap
orlitzky Dec 4, 2023
732e12d
build/pkgs/gap/spkg-configure.m4: change the->for in a message
orlitzky Dec 4, 2023
70747ac
src/sage/features: attempt to load gap packages during feature tests
orlitzky Dec 4, 2023
deaf7a9
src/sage/features/gap.py: change wording "is" -> "has been"
orlitzky Dec 4, 2023
d37c279
src/sage/graphs/generators/families.py: use :meth: to reference a method
orlitzky Dec 4, 2023
694bee9
build/pkgs/gap_packages/SPKG.rst: fix confusing SPKG description
orlitzky Dec 4, 2023
387bf96
src/sage/graphs/generators/families.py: add tilde to a :meth:
orlitzky Dec 4, 2023
a73d0ec
build/pkgs/gap_packages/spkg-install.in: fix install with system gap
orlitzky Dec 5, 2023
c2984f1
tox.ini: it's OK if libgap-dev is missing on ubuntu-focal
orlitzky Dec 6, 2023
0102206
build/pkgs/gap: add fedora and opensuse distro information
orlitzky Dec 6, 2023
bf72457
build/pkgs/gap: require "gap" in addition to libgap-dev on debian
orlitzky Dec 7, 2023
e6858a0
build/pkgs/gap: remove opensuse distro package information
orlitzky Dec 7, 2023
b0ec017
build/pkgs/gap: redirect stderr in spkg-configure.m4 tests
orlitzky Dec 7, 2023
5d10bee
build/pkgs/gap: add more fedora package information
orlitzky Dec 7, 2023
404f23a
build/pkgs/gap{,_packages}: install packagemanager with the gap core …
orlitzky Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/pkgs/gap/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
gap
libgap-dev
5 changes: 5 additions & 0 deletions build/pkgs/gap/distros/fedora.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gap
gap-core
gap-devel
gap-libs
libgap
96 changes: 96 additions & 0 deletions build/pkgs/gap/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
SAGE_SPKG_CONFIGURE([gap], [
# Default to installing the SPKG, if the check is run at all.
sage_spkg_install_gap=yes

m4_pushdef([GAP_MINVER],["4.12.2"])

SAGE_SPKG_DEPCHECK([ncurses readline zlib], [
AC_PATH_PROG(GAP, gap)
AS_IF([test -n "${GAP}"], [
AC_MSG_CHECKING([for gap version GAP_MINVER or newer])

# GAP will later add the "user" path to the list of root paths
# so long as we don't initialize GAP with -r in Sage. But we
# don't want to include it in the hard-coded list.
GAPRUN="${GAP} -r -q --bare --nointeract -c"
_cmd='Display(GAPInfo.KernelInfo.KERNEL_VERSION);'
GAP_VERSION=$( ${GAPRUN} "${_cmd}" 2>/dev/null )
AX_COMPARE_VERSION(["${GAP_VERSION}"], [ge], [GAP_MINVER], [
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for gap root paths])
_cmd='Display(JoinStringsWithSeparator(GAPInfo.RootPaths,";"));'
SYS_GAP_ROOT_PATHS=$( ${GAPRUN} "${_cmd}" 2>/dev/null )
AC_MSG_RESULT([$SYS_GAP_ROOT_PATHS])
AS_IF([test -n "${SYS_GAP_ROOT_PATHS}"], [
AC_MSG_CHECKING([for the PrimGrp, SmallGrp, and TransGrp packages])
# Check for a very minimal set of packages without which the
# sage test suite will fail. The crazy thing below is a
# "quadrigraph" for a square bracket.
_cmd="Display(@<:@"
_cmd="${_cmd} TestPackageAvailability(\"PrimGrp\"),"
_cmd="${_cmd} TestPackageAvailability(\"SmallGrp\"),"
_cmd="${_cmd} TestPackageAvailability(\"TransGrp\")"
_cmd="${_cmd} @:>@);"
_output=$( ${GAPRUN} "${_cmd}" 2>/dev/null )
AS_IF([test $? -eq 0], [
AS_CASE([$_output],
[*fail*],[AC_MSG_RESULT([no (at least one package missing)])],[
# default case, i.e. no "fail"
AC_MSG_RESULT([yes])

AC_MSG_CHECKING([if we can link against libgap])
# That was all for the CLI. Now we check for libgap,
# too. There's a long list of headers we need in
# src/sage/libs/gap/gap_includes.pxd, but libgap-api.h
# combined with the version test above should be
# sufficient even on systems where the headers are
# packaged separately.
_old_libs=$LIBS
LIBS="${LIBS} -lgap"
AC_LANG_PUSH([C])
AC_LINK_IFELSE([
AC_LANG_PROGRAM(
[[#include <gap/libgap-api.h>]],
[[
int main(int argc, char** argv) {
GAP_Initialize(0, 0, 0, 0, 0);
return 0;
}
]])
],[
AC_MSG_RESULT([yes])
sage_spkg_install_gap=no
],[
AC_MSG_RESULT([no])
])
AC_LANG_POP
LIBS="${_old_libs}"
])
], [
# The gap command itself failed
AC_MSG_RESULT([no (package check command failed)])
])
])
],[
# Version too old
AC_MSG_RESULT([no])
])
])
])

m4_popdef([GAP_MINVER])
],[],[],[
# This is the post-check phase, where we make sage-conf
# substitutions, in this case of GAP_ROOT_PATHS. We begin with the
# two root paths used by the sage distribution. The '${prefix}' is
# a magic string that sage-conf will replace.
GAP_ROOT_PATHS='${prefix}/lib/gap;${prefix}/share/gap';

AS_IF([test "${sage_spkg_install_gap}" = "no"],[
# If we're using the system GAP, append the system root
# paths to the existing two sage paths.
GAP_ROOT_PATHS="${GAP_ROOT_PATHS};${SYS_GAP_ROOT_PATHS}"
])

AC_SUBST(GAP_ROOT_PATHS, "${GAP_ROOT_PATHS}")
])
33 changes: 15 additions & 18 deletions build/pkgs/gap/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,43 @@ if [ "$SAGE_DEBUG" = yes ] ; then
export CFLAGS="-O0 -g3 -DDEBUG_MASTERPOINTERS -DDEBUG_GLOBAL_BAGS -DDEBUG_FUNCTIONS_BAGS $CFLAGS"
fi

# LDFLAGS hack below needed by Semigroups package
sdh_configure $SAGE_CONFIGURE_GMP LDFLAGS="-pthread" --prefix=$SAGE_LOCAL
sdh_configure $SAGE_CONFIGURE_GMP --prefix=$SAGE_LOCAL
sdh_make

sdh_make_install
# sdh_make install-headers install-libgap
# The 'packagemanager' package expects this https://github.com/gap-packages/PackageManager/issues/105
mkdir -p "$SAGE_LOCAL/lib/gap/bin"

# Install only the minimal packages GAP needs to run
sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg

# Install additional packages that are not strictly required, but that are
# typically "expected" to be loaded: These are the default packages that are
# autoloaded at GAP startup (via the PackagesToLoad UserPreference) with an
# out-of-the-box GAP installation; see
# https://github.com/sagemath/sage/issues/22626#comment:393 for discussion on this
#
# Also include atlasrep which is a dependency of tomlib
# Install additional packages that are automatically loaded in the
# default GAP configuration. The list can be found in lib/package.gi
# as part of the "PackagesToLoad" user preference. Also include
# atlasrep because it is a dependency of tomlib.
sdh_install \
pkg/alnuth \
pkg/atlasrep \
pkg/autodoc \
pkg/autpgrp \
pkg/alnuth \
pkg/crisp \
pkg/ctbllib \
pkg/factint \
pkg/fga \
pkg/irredsol \
pkg/laguna \
pkg/packagemanager \
pkg/polenta \
pkg/polycyclic \
pkg/radiroot \
pkg/resclasses \
pkg/sophus \
pkg/tomlib \
pkg/utils \
"$GAP_ROOT"/pkg

# Finally, install packagemanager for the people who reject both
# sage's and their system's package managers. We have to create
# the local bin directory first:
#
# https://github.com/gap-packages/PackageManager/issues/105
#
mkdir -p "$SAGE_LOCAL/lib/gap/bin"
sdh_install pkg/packagemanager "$GAP_ROOT"/pkg

# TODO: This seems unnecessary--we are already installing all of doc/ to
# GAP_ROOT, which is necessary for some functionality in GAP to work. Do
# we need this? Maybe doc/gap could just be a symlink to gap/doc??
Expand Down
14 changes: 14 additions & 0 deletions build/pkgs/gap_packages/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ Description
Several "official" and "undeposited" GAP packages available from
https://www.gap-system.org/Packages/packages.html

Installing this SPKG will install the corresponding GAP packages, but
before you can use them in Sage, they still have to be loaded into
either the GAP interface or libgap::

sage: gap.eval('LoadPackage("Grape")') # optional - gap_packages
'true'
sage: libgap.LoadPackage("Grape") # optional - gap_packages
true

Those correspond to::

gap> LoadPackage("Grape");

within the GAP interface and libgap, respectively.

Upstream Contact
----------------
Expand Down
36 changes: 34 additions & 2 deletions build/pkgs/gap_packages/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
GAP_ROOT="$SAGE_LOCAL/lib/gap"
PKG_DIR="$GAP_ROOT/pkg"
# Ask GAP for the directory where sysinfo.gap lives. This is to
# support system GAP installations. This root-path gathering
# command is borrowed from gap's spkg-configure.m4 and modified
# to separate the paths with spaces.
GAPRUN="gap -r -q --bare --nointeract -c"
_cmd='Display(JoinStringsWithSeparator(GAPInfo.RootPaths," "));'
GAP_ROOT_PATHS=$(${GAPRUN} "${_cmd}")

# Loop though GAP_ROOT_PATHS looking for sysinfo.gap
GAP_ROOT=""
for grp in $GAP_ROOT_PATHS; do
if [ -f "${grp}/sysinfo.gap" ]; then
GAP_ROOT=$grp
echo "found GAP root $GAP_ROOT"
break
fi
done

# Try the old sage default if nothing else worked.
if [ -z "$GAP_ROOT" ]; then
GAP_ROOT="$SAGE_LOCAL/lib/gap"
echo "falling back to GAP root $GAP_ROOT"
fi

# And finally, throw an error ASAP if the build is going to fail anyway.
if [ ! -f "${GAP_ROOT}/sysinfo.gap" ]; then
sdh_die "no sysinfo.gap in your gap root"
fi

# Where to install these packages
PKG_DIR="$SAGE_LOCAL/lib/gap/pkg"

PKG_SRC_DIR="$(pwd)/src/pkg"
cd "$PKG_SRC_DIR"
Expand All @@ -12,6 +41,7 @@ cd "$PKG_SRC_DIR"

sdh_install \
aclib \
autodoc \
corelg \
crime \
cryst \
Expand All @@ -31,11 +61,13 @@ sdh_install \
polymaking \
qpa \
quagroup \
radiroot \
repsn \
singular \
sla \
sonata \
toric \
utils \
"$PKG_DIR"

install_compiled_pkg()
Expand Down
5 changes: 5 additions & 0 deletions pkgs/sage-conf/_sage_conf/_conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ VERSION = "@PACKAGE_VERSION@"
SAGE_LOCAL = "@prefix@"
SAGE_ROOT = "@SAGE_ROOT@"

# The semicolon-separated list of GAP root paths. This is the list of
# locations that are searched for GAP packages. This is passed directly
# to GAP via the -l flag.
GAP_ROOT_PATHS = "@GAP_ROOT_PATHS@".replace('${prefix}', SAGE_LOCAL)

# The path to the standalone maxima executable.
MAXIMA = "@SAGE_MAXIMA@".replace('${prefix}', SAGE_LOCAL)

Expand Down
4 changes: 3 additions & 1 deletion src/bin/sage
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,9 @@ fi

if [ "$1" = '-gap' -o "$1" = '--gap' ]; then
shift
exec gap "$@"
# Use "-A" to avoid warnings about missing packages. The gap
# interface and libgap within sage both already do this.
exec gap -A "$@"
fi

if [ "$1" = '-gap3' -o "$1" = '--gap3' ]; then
Expand Down
4 changes: 2 additions & 2 deletions src/doc/en/constructions/groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ Here's another way, working more directly with GAP::
sage: print(gap.eval("normal := NormalSubgroups( G )"))
[ Alt( [ 1 .. 5 ] ), Group(()) ]
sage: G = gap.new("DihedralGroup( 10 )")
sage: G.NormalSubgroups()
[ Group( [ f1, f2 ] ), Group( [ f2 ] ), Group( <identity> of ... ) ]
sage: G.NormalSubgroups().SortedList()
[ Group( <identity> of ... ), Group( [ f2 ] ), Group( [ f1, f2 ] ) ]
sage: print(gap.eval("G := SymmetricGroup( 4 )"))
Sym( [ 1 .. 4 ] )
sage: print(gap.eval("normal := NormalSubgroups( G );"))
Expand Down
12 changes: 5 additions & 7 deletions src/doc/en/prep/Quickstarts/Abstract-Algebra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,13 @@ rather than just a list of numbers. This can be very powerful.

::

sage: for K in D.normal_subgroups():
sage: len(D.normal_subgroups())
7
sage: for K in sorted(D.normal_subgroups()):
....: print(K)
Subgroup generated by [(1,2,3,4,5,6,7,8), (1,8)(2,7)(3,6)(4,5)] of (Dihedral group of order 16 as a permutation group)
Subgroup generated by [(1,2,3,4,5,6,7,8), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)] of (Dihedral group of order 16 as a permutation group)
Subgroup generated by [(1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8), (1,8)(2,7)(3,6)(4,5)] of (Dihedral group of order 16 as a permutation group)
Subgroup generated by [(2,8)(3,7)(4,6), (1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)] of (Dihedral group of order 16 as a permutation group)
Subgroup generated by [(1,3,5,7)(2,4,6,8), (1,5)(2,6)(3,7)(4,8)] of (Dihedral group of order 16 as a permutation group)
Subgroup generated by [(1,5)(2,6)(3,7)(4,8)] of (Dihedral group of order 16 as a permutation group)
Subgroup generated by [()] of (Dihedral group of order 16 as a permutation group)
...
Subgroup generated by [(1,2,3,4,5,6,7,8), (1,8)(2,7)(3,6)(4,5)] of (Dihedral group of order 16 as a permutation group)

We can access specific subgroups if we know the generators as a
permutation group.
Expand Down
13 changes: 7 additions & 6 deletions src/sage/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,7 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st
GRAPHS_DATA_DIR = var("GRAPHS_DATA_DIR", join(SAGE_SHARE, "graphs"))
ELLCURVE_DATA_DIR = var("ELLCURVE_DATA_DIR", join(SAGE_SHARE, "ellcurves"))
POLYTOPE_DATA_DIR = var("POLYTOPE_DATA_DIR", join(SAGE_SHARE, "reflexive_polytopes"))
GAP_LIB_DIR = var("GAP_LIB_DIR", join(SAGE_LOCAL, "lib", "gap"))
GAP_SHARE_DIR = var("GAP_SHARE_DIR", join(SAGE_SHARE, "gap"))

COMBINATORIAL_DESIGN_DATA_DIR = var("COMBINATORIAL_DESIGN_DATA_DIR", join(SAGE_SHARE, "combinatorial_designs"))
CREMONA_MINI_DATA_DIR = var("CREMONA_MINI_DATA_DIR", join(SAGE_SHARE, "cremona"))
CREMONA_LARGE_DATA_DIR = var("CREMONA_LARGE_DATA_DIR", join(SAGE_SHARE, "cremona"))
Expand Down Expand Up @@ -243,11 +242,13 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st
# GAP memory and args

SAGE_GAP_MEMORY = var('SAGE_GAP_MEMORY', None)
_gap_cmd = "gap -r"
if SAGE_GAP_MEMORY is not None:
_gap_cmd += " -s " + SAGE_GAP_MEMORY + " -o " + SAGE_GAP_MEMORY
SAGE_GAP_COMMAND = var('SAGE_GAP_COMMAND', _gap_cmd)
SAGE_GAP_COMMAND = var('SAGE_GAP_COMMAND', None)

# The semicolon-separated search path for GAP packages. It is passed
# directly to GAP via the -l flag.
GAP_ROOT_PATHS = var("GAP_ROOT_PATHS",
";".join([join(SAGE_LOCAL, "lib", "gap"),
join(SAGE_LOCAL, "share", "gap")]))

# post process
if DOT_SAGE is not None and ' ' in DOT_SAGE:
Expand Down
14 changes: 14 additions & 0 deletions src/sage/ext_data/gap/sage.g
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,17 @@ end;
#
# LogTo("/tmp/gapsage.log");
#


# Load the GAP packages that GAP itself tries to autoload in the
# default configuration (see "PackagesToLoad" in lib/package.gi). The
# combination of passing -A to gap and these LoadPackage statements
# allows us to load the usual set of packages, but only if they are
# installed. So most people will get exactly the default behavior,
# but minimal installations won't throw warnings and fail tests.
_autoloads := [ "autpgrp", "alnuth", "crisp", "ctbllib", "factint", "fga",
"irredsol", "laguna", "polenta", "polycyclic", "resclasses",
"sophus", "tomlib" ];
for p in _autoloads do
LoadPackage(p);
od;
Loading
Loading