Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Aug 26, 2024
1 parent 00459ae commit 0f61d39
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ jobs:
- master
- stable-4.13
- stable-4.12
- stable-4.11
- stable-4.10
- stable-4.9

steps:
- uses: actions/checkout@v4
Expand Down
13 changes: 7 additions & 6 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ PackageDoc := rec(
),

Dependencies := rec(
GAP := ">= 4.9",
GAP := ">= 4.12",
NeededOtherPackages := [
[ "GAPDoc", ">= 1.5" ],
[ "polycyclic", ">= 2.11" ],
Expand All @@ -86,11 +86,12 @@ Dependencies := rec(
),

AvailabilityTest := function()
local path, file;
# the file below must exist for this package to work
path := DirectoriesPackagePrograms("DeepThought");
file := Filename(path, "DeepThought.so");
return file <> fail;
if not IsKernelExtensionAvailable("DeepThought") then
LogPackageLoadingMessage(PACKAGE_WARNING,
["the kernel module is not compiled, ",
"the package cannot be loaded."]);
return fail;
fi;
end,

TestFile := "tst/testall.g",
Expand Down
15 changes: 11 additions & 4 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
#
# Reading the declaration part of the package.
#
_PATH_SO:=Filename(DirectoriesPackagePrograms("DeepThought"), "DeepThought.so");
if _PATH_SO <> fail then
LoadDynamicModule(_PATH_SO);

if CompareVersionNumbers(GAPInfo.Version, "4.12") then
if not LoadKernelExtension("DeepThought") then
Error("failed to load the DeepThought package kernel extension");
fi;
else
_PATH_SO:=Filename(DirectoriesPackagePrograms("DeepThought"), "DeepThought.so");
if _PATH_SO <> fail then
LoadDynamicModule(_PATH_SO);
fi;
Unbind(_PATH_SO);
fi;
Unbind(_PATH_SO);

ReadPackage( "DeepThought", "gap/DTObj.gd");
ReadPackage( "DeepThought", "gap/DeepThought.gd");

0 comments on commit 0f61d39

Please sign in to comment.