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

Update kernel module checking #61

Merged
merged 2 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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:
flags: ''
- gap: 'stable-4.12'
flags: ''
- gap: 'stable-4.11'
flags: ''

env:
CONF_FLAG: ${{ matrix.flags }}
BRANCH: ${{ matrix.gap }}
Expand Down
7 changes: 5 additions & 2 deletions PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,17 @@ PackageDoc := rec(
),

Dependencies := rec(
GAP := ">= 4.11",
GAP := ">= 4.12",
NeededOtherPackages := [ [ "GAPDoc", ">= 1.5" ] ],
SuggestedOtherPackages := [ ],
ExternalConditions := [ ],
),

AvailabilityTest := function()
if Filename(DirectoriesPackagePrograms("ferret"), "ferret.so") = fail then
if not IsKernelExtensionAvailable("ferret") then
LogPackageLoadingMessage(PACKAGE_WARNING,
["the kernel module is not compiled, ",
"the package cannot be loaded."]);
return fail;
fi;
return true;
Expand Down
6 changes: 6 additions & 0 deletions init.g
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
##

#############################################################################

# load kernel function if it is installed
if not LoadKernelExtension("ferret") then
Error("failed to load the ferret package kernel extension");
fi;

##
#R Read the declaration files.
##
Expand Down
8 changes: 0 additions & 8 deletions read.g
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
##
#R Read the install files.
##

# Load C code
_PATH_SO:=Filename(DirectoriesPackagePrograms("ferret"), "ferret.so");
if _PATH_SO <> fail then
LoadDynamicModule(_PATH_SO);
fi;
Unbind(_PATH_SO);

ReadPackage( "ferret", "lib/helper_functions.g" );
ReadPackage( "ferret", "lib/yapb.gi" );
ReadPackage( "ferret", "lib/overloadmethods.gi" );
Expand Down