Skip to content

Commit

Permalink
fix create_sys_image
Browse files Browse the repository at this point in the history
  • Loading branch information
Uwe Fechner committed Mar 31, 2024
1 parent d82dab5 commit 492aa58
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions bin/create_sys_image
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ if test -f "Manifest.toml"; then
mv Manifest.toml Manifest.toml.bak
fi
julia --project -e "include(\"./test/update_packages.jl\");"
julia -e "using Pkg; Pkg.add(\"TestEnv\")"
julia --project -e "using Pkg; using TestEnv; TestEnv.activate(); Pkg.add(\"PyCall\"); Pkg.build(\"PyCall\")"
# julia -e "using Pkg; Pkg.add(\"TestEnv\")"
# julia --project -e "using Pkg; using TestEnv; TestEnv.activate(); Pkg.add(\"PyCall\"); Pkg.build(\"PyCall\")"

echo "--> 1"
julia --project -e "using Pkg; Pkg.precompile()"
echo "--> 2"
julia --project -e "include(\"./test/create_sys_image.jl\");"
mv kps-image_tmp.so bin/kps-image-${julia_major}.so
echo "--> 1"
echo "--> 3"
julia --project -e "using Pkg; try; Pkg.precompile(); catch; println(\"Warning...\"); end"
echo "--> 2"
echo "--> 4"
julia --project -J bin/kps-image-${julia_major}.so -e "using ControlPlots, NativeFileDialog"
echo "--> 3"
echo "--> 5"
julia --project -J bin/kps-image-${julia_major}.so -e "try; using Plots; catch; println(\"Warning when precompiling Plots...\"); end"
echo "Successfully created system image!"
2 changes: 1 addition & 1 deletion test/create_sys_image.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ PackageCompiler.create_sysimage(
sysimage_path="kps-image_tmp.so",
precompile_execution_file=joinpath("test", "test_for_precompile.jl")
)
Pkg.add("Plots")
# Pkg.add("Plots")

0 comments on commit 492aa58

Please sign in to comment.