-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathread.g
45 lines (40 loc) · 1.64 KB
/
read.g
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# JuliaInterface: Test interface to julia
#
# Reading the implementation part of the package.
#
ReadPackage( "JuliaInterface", "gap/JuliaInterface.gi");
ReadPackage( "JuliaInterface", "gap/adapter.gi");
ReadPackage( "JuliaInterface", "gap/calls.gi");
ReadPackage( "JuliaInterface", "gap/convert.gi");
ReadPackage( "JuliaInterface", "gap/utils.gi");
ReadPackage( "JuliaInterface", "gap/helpstring.g");
ReadPackage( "JuliaInterface", "gap/juliahelp.g");
MakeReadWriteGlobal("DirectoriesPackagePrograms");
DirectoriesPackagePrograms := function(name)
local info, installationpath, override;
# We are not allowed to call
# `InstalledPackageVersion', `TestPackageAvailability' etc.
name:= LowercaseString( name );
info:= PackageInfo( name );
if IsBound( GAPInfo.PackagesLoaded.( name ) ) then
# The package is already loaded.
installationpath:= GAPInfo.PackagesLoaded.( name )[1];
elif IsBound( GAPInfo.PackageCurrent ) and
LowercaseString( GAPInfo.PackageCurrent.PackageName ) = name then
# The package in question is currently going to be loaded.
installationpath:= GAPInfo.PackageCurrent.InstallationPath;
elif 0 < Length( info ) then
# Take the installed package with the highest version
# that has been found first in the root paths.
installationpath:= info[1].InstallationPath;
else
# This package is not known.
return [];
fi;
override := JuliaToGAP( IsString, Julia.GAP.find_override(GAPToJulia(installationpath)) );
return [ Directory( override ) ];
end;
MakeReadOnlyGlobal("DirectoriesPackagePrograms");
# setup JLL overrides
Julia.GAP.setup_overrides();