Skip to content

Commit

Permalink
adding easyconfigs: ResistanceGA-4.2-5-foss-2022a-R-4.2.1-Julia-1.9.2…
Browse files Browse the repository at this point in the history
….eb, RCall-0.13.17-foss-2022a-R-4.2.1-Julia-1.9.2.eb and patches: JuliaCall-0.17.5-top_level_macro.patch
  • Loading branch information
Orient committed Oct 6, 2023
1 parent b31294e commit 9e9bd63
Show file tree
Hide file tree
Showing 3 changed files with 344 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
easyblock = 'JuliaBundle'

name = 'RCall'
version = '0.13.17'
local_juliaver = '1.9.2'
versionsuffix = '-R-%%(rver)s-Julia-%s' % local_juliaver

homepage = 'https://github.com/JuliaInterop/RCall.jl'
description = """This package facilitates communication between R and Julia and allows the
user to call R packages from within Julia, providing the best of both worlds."""

toolchain = {'name': 'foss', 'version': '2022a'}

dependencies = [
('R', '4.2.1'),
('Julia', local_juliaver, '-linux-%s' % ARCH, SYSTEM),
]

preinstallopts = "export LD_LIBRARY_PATH=$EBROOTJULIA/lib/julia:$LD_LIBRARY_PATH && "

exts_default_options = {
'source_tmpl': 'v%(version)s.tar.gz',
}

exts_list = [
('Preferences', '1.4.1', {
'source_urls': ['https://github.com/JuliaPackaging/Preferences.jl/archive/'],
'checksums': ['2240d5df55d69b22d27cb152c4abf8bf51106cd0b5910e194b5ab0ef8f260fcf'],
}),
('PrecompileTools', '1.2.0', {
'source_urls': ['https://github.com/JuliaLang/PrecompileTools.jl/archive/'],
'checksums': ['8885c92380609bf077f316d454e92c75806353dbc22873c783207fc027401f2e'],
}),
('Parsers', '2.7.2', {
'source_urls': ['https://github.com/JuliaData/Parsers.jl/archive/'],
'checksums': ['e8d837cfc5cdaec0eb692eb58c00fb1d476327a7dc79398d7ce711cf8e8e3fa1'],
}),
('StructTypes', '1.10.0', {
'source_urls': ['https://github.com/JuliaData/StructTypes.jl/archive/'],
'checksums': ['f2d7edc4f21651f76ff21251bfe8ec417c5688ed56880654bfb1482f580ab072'],
}),
('JSON', '0.21.4', {
'source_urls': ['https://github.com/JuliaIO/JSON.jl/archive/'],
'checksums': ['c6b620ad4150ec5a154367f50c9579af800e3a89a6d8f9cb5dd30215a5d3f552'],
}),
('DataAPI', '1.15.0', {
'source_urls': ['https://github.com/JuliaData/DataAPI.jl/archive/'],
'checksums': ['c5d535c1a276ef6a0dc765eb720fd66321aa1e6fd944f78462276f1070c7bfa6'],
}),
('Missings', '1.1.0', {
'source_urls': ['https://github.com/JuliaData/Missings.jl/archive/'],
'checksums': ['149c799f261e4f1645124c8f6957ccec16a5c59e03bea9fcc6b66c3038d8f757'],
}),
('CategoricalArrays', '0.9.7', {
'source_urls': ['https://github.com/JuliaData/CategoricalArrays.jl/archive/'],
'checksums': ['57ad0322d613ba88dae8f05d41fcd30ffe381205d5f8dbbdaf5eafcd762a3f10'],
}),
('WinReg', '1.0.0', {
'source_urls': ['https://github.com/simonbyrne/WinReg.jl/archive/'],
'checksums': ['79f5ac2c678501cc6c6a3b443c9bbbeb701efe335556c235e48da9002cdea97d'],
}),
('ShiftedArrays', '2.0.0', {
'source_urls': ['https://github.com/JuliaArrays/ShiftedArrays.jl/archive/'],
'checksums': ['909f9b8bdef0fedf2202645e4a3147d4365dad8acab42853b0e0d804d5d0df38'],
}),
('IrrationalConstants', '0.2.2', {
'source_urls': ['https://github.com/JuliaMath/IrrationalConstants.jl/archive/'],
'checksums': ['bece9a3643264a76bd625c3f9cf3b46bba0fd093f06e899e8d6167cf45d7e833'],
}),
('DocStringExtensions', '0.9.3', {
'source_urls': ['https://github.com/JuliaDocs/DocStringExtensions.jl/archive/'],
'checksums': ['9c712789b1cbd367bced9fafb995dee026f931ac68b55e476d1c666210564ae6'],
}),
('LogExpFunctions', '0.3.26', {
'source_urls': ['https://github.com/JuliaStats/LogExpFunctions.jl/archive/'],
'checksums': ['c78ff1b55a56ee6e5d4507d3ec762de7975e892350a204f8267fd0760d5f0a2f'],
}),
('StatsAPI', '1.7.0', {
'source_urls': ['https://github.com/JuliaStats/StatsAPI.jl/archive/'],
'checksums': ['40a339e45e34266f60c9e806c8f5d3497a92a24c708024ed247a5bb3b7df1b99'],
}),
('Compat', '4.10.0', {
'source_urls': ['https://github.com/JuliaLang/Compat.jl/archive/'],
'checksums': ['fff17f6648c8d26e5ad8058fbd78ae5583317ee78367062307b1205249c646b2'],
}),
('OrderedCollections', '1.5.0', {
'source_urls': ['https://github.com/JuliaCollections/OrderedCollections.jl/archive/'],
'checksums': ['52489d9a431aa7087d02962112ea67d1be8ac17da1b7906a717d70588448975f'],
}),
('DataStructures', '0.18.15', {
'source_urls': ['https://github.com/JuliaCollections/DataStructures.jl/archive/'],
'checksums': ['c37bf28d0105c2cba907d1301868e8701c862f180e3388229e42413fbbcc116c'],
}),
('SortingAlgorithms', '1.1.0', {
'source_urls': ['https://github.com/JuliaCollections/SortingAlgorithms.jl/archive/'],
'checksums': ['bf9c1c1946c8eb058f9db66d59735cbf449407ab2dd301ccc561193057722cf3'],
}),
('StatsBase', '0.34.0', {
'source_urls': ['https://github.com/JuliaStats/StatsBase.jl/archive/'],
'checksums': ['d6c12db91fadb484391529df5dabe06457c9aea0f27767958a5502f1d835fc8c'],
}),
('Reexport', '1.2.2', {
'source_urls': ['https://github.com/simonster/Reexport.jl/archive/'],
'checksums': ['2566f7776aae9697cbf15765fc32187f46dd51200abc953a0266863ad67132b3'],
}),
('JLLWrappers', '1.5.0', {
'source_urls': ['https://github.com/JuliaPackaging/JLLWrappers.jl/archive/'],
'checksums': ['6e83b81afd0c57636e80bcf52ad51f6ba43d98643cac999727b958d9ab3d4a01'],
}),
('OpenSpecFun_jll', '0.5.5+0', {
'source_urls': ['https://github.com/JuliaBinaryWrappers/OpenSpecFun_jll.jl/archive/'],
'sources': 'OpenSpecFun-v%(version)s.tar.gz',
'checksums': ['6d1df617dd0a80fc0de5bc41a092e51f72782dbfd296c64e151707733cb57b6f'],
}),
('SpecialFunctions', '2.3.1', {
'source_urls': ['https://github.com/JuliaMath/SpecialFunctions.jl/archive/'],
'checksums': ['c3197bfd8d2d90287a613c72b46ed04da69c6cf3870bae5ddbf9f4965f1f0823'],
}),
('Calculus', '0.5.1', {
'source_urls': ['https://github.com/JuliaMath/Calculus.jl/archive/'],
'checksums': ['589a2b9ebdc9ccae98e2bb31b073f978e94d8e2125e14fd74aa1b3aa5746fe9a'],
}),
('NaNMath', '1.0.2', {
'source_urls': ['https://github.com/JuliaMath/NaNMath.jl/archive/'],
'checksums': ['871f310dd1ad32f41e956f01d3149279e6b352fe459e40a334e9c076847fedd5'],
}),
('DualNumbers', '0.6.8', {
'source_urls': ['https://github.com/JuliaDiff/DualNumbers.jl/archive/'],
'checksums': ['5d27ff5a2b0465377d6d3bc7ea9165ff31373e2909dcf786b0593fc8d6ddd31a'],
}),
('HypergeometricFunctions', '0.3.23', {
'source_urls': ['https://github.com/JuliaMath/HypergeometricFunctions.jl/archive/'],
'checksums': ['54019965d08fa0097eaa418701ef3e271931aa9e76ae3b0d009d13a96c329b64'],
}),
('Rmath_jll', '0.4.0+0', {
'source_urls': ['https://github.com/JuliaBinaryWrappers/Rmath_jll.jl/archive/'],
'sources': 'Rmath-v%(version)s.tar.gz',
'checksums': ['8cfe0bf37caa1297b3ea5d97bc29fae89bc41a25a723ef692f37d709f4e8c191'],
}),
('Rmath', '0.7.1', {
'source_urls': ['https://github.com/JuliaStats/Rmath.jl/archive/'],
'checksums': ['4661107aca0c327849ec2635d282484d077518134ba69d741f2cb45efddd4b40'],
}),
('StatsFuns', '1.3.0', {
'source_urls': ['https://github.com/JuliaStats/StatsFuns.jl/archive/'],
'checksums': ['0b1a8707b02cfd175c3d1e5b411625b380ffb4f280f05d177167515dbad3e007'],
}),
('IteratorInterfaceExtensions', '1.0.0', {
'source_urls': ['https://github.com/queryverse/IteratorInterfaceExtensions.jl/archive/'],
'checksums': ['c43dc43fc29c0c7aa738793c5a847ce29491c5fca1a0f0e434fff1bb1c5c7994'],
}),
('TableTraits', '1.0.1', {
'source_urls': ['https://github.com/queryverse/TableTraits.jl/archive/'],
'checksums': ['a69811f66cd1b7a6d91a0da30bf8a3ab796138615c4ada2d0f4ec044313b32e2'],
}),
('DataValueInterfaces', '1.0.0', {
'source_urls': ['https://github.com/queryverse/DataValueInterfaces.jl/archive/'],
'checksums': ['7f70be7cf1e49f7ce45bca8452193d08c2e75378f6b473205395c01010929825'],
}),
('Tables', '1.11.0', {
'source_urls': ['https://github.com/JuliaData/Tables.jl/archive/'],
'checksums': ['663cfcd724a0388231f181c8be714fa53415dbe7c044cc2526721d6f3cec73b3'],
}),
('StatsModels', '0.7.3', {
'source_urls': ['https://github.com/JuliaStats/StatsModels.jl/archive/'],
'checksums': ['6d9d14ab9dc25a74003e381dad48d74cc7e8547dbef875ef6dc9b4d672b0fc3d'],
}),
('VersionParsing', '1.3.0', {
'source_urls': ['https://github.com/JuliaInterop/VersionParsing.jl/archive/'],
'checksums': ['f90fe419e1a40ef0eccfaaed1d1b7792d9115a059a82d0c23e3c04c944d0f8ca'],
}),
('Conda', '1.9.1', {
'source_urls': ['https://github.com/JuliaPy/Conda.jl/archive/'],
'checksums': ['2a5e7074a36f885ee6020a077f55ba4d73963fdfcfe29d2567853dd9245f93de'],
}),
('StringManipulation', '0.3.4', {
'source_urls': ['https://github.com/ronisbr/StringManipulation.jl/archive/'],
'checksums': ['5b2a606e8136a9b335ef4d62199a252b73b3ded614d519227929769542586cc0'],
}),
('Crayons', '4.1.1', {
'source_urls': ['https://github.com/KristofferC/Crayons.jl/archive/'],
'checksums': ['ea708df14bd15293cb311978c9cd6b232f39d10f1d06c9e6bbecde7d4a0aa81a'],
}),
('LaTeXStrings', '1.3.0', {
'source_urls': ['https://github.com/JuliaStrings/LaTeXStrings.jl/archive/'],
'checksums': ['9754cee3991d3a92827112b60064b381bec62e383634984dc0cad1fbc3301bda'],
}),
('PrettyTables', '2.2.7', {
'source_urls': ['https://github.com/ronisbr/PrettyTables.jl/archive/'],
'checksums': ['6f38d8530c8da33e77bd6085b40c8daa2abf697a2bcbfdeeaa6b9f5a84eff72b'],
}),
('PooledArrays', '1.4.3', {
'source_urls': ['https://github.com/JuliaData/PooledArrays.jl/archive/'],
'checksums': ['5500196c2d17233a35abb4c28a36e55d3ebba0940b1f8356ae5463f7e4c744da'],
}),
('InvertedIndices', '1.3.0', {
'source_urls': ['https://github.com/JuliaData/InvertedIndices.jl/archive/'],
'checksums': ['86d6fed34f734811dc6878fdeab7e84f96963342839a2c355b25babbf1fb980a'],
}),
('InlineStrings', '1.4.0', {
'source_urls': ['https://github.com/JuliaStrings/InlineStrings.jl/archive/'],
'checksums': ['700fbfaa7df0b6fead63a340d1c1f9033fc8d721a80b5bb8769eb399d3a4698d'],
}),
('SentinelArrays', '1.4.0', {
'source_urls': ['https://github.com/JuliaData/SentinelArrays.jl/archive/'],
'checksums': ['816f12904041709aefb6b1fbfcaf4e21ac5e4dfb2bb3240fa68899f2023bea6e'],
}),
('DataFrames', '1.6.1', {
'source_urls': ['https://github.com/JuliaData/DataFrames.jl/archive/'],
'checksums': ['2a72341a40860b45952ac7c2efee41e0f0ffb5faf7a59fbeb092dd49927d26c8'],
}),
('Requires', '1.3.0', {
'source_urls': ['https://github.com/JuliaPackaging/Requires.jl/archive/'],
'checksums': ['8af4dac29839e796a651b8cb6a325b6f9c7eee5d5620b3e366b64f58325ebeb7'],
}),
(name, version, {
'source_urls': ['https://github.com/JuliaInterop/RCall.jl/archive/'],
'checksums': ['0f706f4c0ac8739096ac2f3f032286b9a2b7419fa80443ec8f1a61817b61e51d'],
}),
]

sanity_check_commands = ["julia -e 'using Pkg;Pkg.test(\"%(name)s\")'"]

sanity_check_paths = {
'files': [],
'dirs': ['packages/%(name)s'],
}

# When loading R and Julia, there seems to be a library collision and Julia (namely Pkg module) doesn't work properly
# This is a workaround to make Julia find the correct libraries
modluafooter = """
prepend_path("LD_LIBRARY_PATH", os.getenv("EBROOTJULIA") .. "/lib/julia")
"""

moduleclass = 'tools'
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
There is an error in current JuliaCall, which should be patched in upcoming versions.
See https://github.com/Non-Contradiction/JuliaCall/issues/203
diff -ruN JuliaCall_orig/inst/julia/JuliaObject.jl JuliaCall/inst/julia/JuliaObject.jl
--- JuliaCall_orig/inst/julia/JuliaObject.jl 2022-09-07 18:13:31.000000000 +0200
+++ JuliaCall/inst/julia/JuliaObject.jl 2023-09-26 17:29:44.310679473 +0200
@@ -74,14 +74,14 @@
## we should use JuliaObject for general AbstractArray
@static if julia07
@suppress_err begin
- JuliaCall.sexpclass(x :: AbstractArray{T}) where {T} = RClass{:JuliaObject}
+ @eval JuliaCall.sexpclass(x :: AbstractArray{T}) where {T} = RClass{:JuliaObject}
end

## AbstractArray{Any} should be converted to R List
sexpclass(x :: AbstractArray{Any}) = RClass{:list}
else
@suppress_err begin
- JuliaCall.sexp(x :: AbstractArray{T}) where {T} = sexp(JuliaObject(x))
+ @eval JuliaCall.sexp(x :: AbstractArray{T}) where {T} = sexp(JuliaObject(x))
end

## AbstractArray{Any} should be converted to R List
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
easyblock = 'Bundle'

name = 'ResistanceGA'
version = '4.2-5'
local_commit = '04326a8'
local_juliaver = '1.9.2'
versionsuffix = '-R-%%(rver)s-Julia-%s' % local_juliaver

homepage = 'https://github.com/wpeterman/ResistanceGA'
description = "An R package to optimize resistance surfaces using Genetic Algorithms."

toolchain = {'name': 'foss', 'version': '2022a'}

dependencies = [
('R', '4.2.1'),
('Julia', local_juliaver, '-linux-%s' % ARCH, SYSTEM),
('Circuitscape', '5.12.3', '-Julia-%s' % local_juliaver, SYSTEM),
('RCall', '0.13.17', versionsuffix),
]

exts_defaultclass = 'RPackage'
exts_filter = ("R -q --no-save", "library(%(ext_name)s)")

exts_default_options = {
'source_urls': [
'https://cran.r-project.org/src/contrib/',
'https://cran.rstudio.com/src/contrib/',
'https://cran.r-project.org/src/contrib/Archive/%(name)s/',
],
'source_tmpl': '%(name)s_%(version)s.tar.gz',
}

exts_list = [
('Suppressor', '0.2.4', {
'easyblock': 'JuliaPackage',
'exts_filter': ("julia -e 'using %(ext_name)s'", ''),
'preinstallopts': "export LD_LIBRARY_PATH=$EBROOTJULIA/lib/julia:$LD_LIBRARY_PATH && ",
'source_tmpl': 'v%(version)s.tar.gz',
'source_urls': ['https://github.com/JuliaIO/Suppressor.jl/archive/'],
'checksums': ['5075b06ed6aa0956c786e5b5fe3d77571a4dd34e6d63b45e113c312729384cf4'],
}),
('GA', '3.2.2', {
'checksums': ['6245c634a11b8414bde7ed326b8c615512645489b19969619484c865e900bf8c'],
}),
('MuMIn', '1.47.1', {
'checksums': ['1223b5ada6f7d58220ac0267fa3473993190742646cbbb3dfe63895e61621af6'],
}),
('spdep', '1.2-7', {
'checksums': ['9dac594825bf2d0aa31e845bfec05d8ce206327840fe455391741dbbdf9c9eea'],
}),
('JuliaCall', '0.17.5', {
'patches': ['JuliaCall-0.17.5-top_level_macro.patch'],
'checksums': [
{'JuliaCall_0.17.5.tar.gz': '92542f9f02fe43702c18cf6c5a52fcbfc5ef3da6a2f73bfded773f4fc5edd90c'},
{'JuliaCall-0.17.5-top_level_macro.patch':
'18f9cacb9f263e62145432b44ce6856bc01b91bae6b1e433c07c23d401850f14'},
],
}),
('XR', '0.7.2', {
'checksums': ['7fc35f607d68095f861711fda9acbd8804829ad3915a22a407ab1e9fb89c1949'],
}),
('XRJulia', '0.9.0', {
'checksums': ['f59fddbe7ab65562f6e019ca7016417fff81f5b7e5f0ddeb00129aaaa6336f68'],
}),
(name, version, {
'source_urls': ['https://github.com/wpeterman/ResistanceGA/archive/'],
'sources': [{'download_filename': '04326a8.tar.gz', 'filename': '%(name)s-%(version)s.tar.gz'}],
'checksums': ['6791c8b42559c0abe94b7a326961f45af2939905021cb9da7220383bf2ea3d75'],
}),
]

modextrapaths = {
'R_LIBS_SITE': '',
}

# When loading R and Julia, there seems to be a library collision and Julia (namely Pkg module) doesn't work properly
# This is a workaround to make Julia find the correct libraries
modluafooter = """
prepend_path("LD_LIBRARY_PATH", os.getenv("EBROOTJULIA") .. "/lib/julia")
"""

sanity_check_paths = {
'files': [],
'dirs': ['%(name)s'],
}

moduleclass = 'bio'

0 comments on commit 9e9bd63

Please sign in to comment.