Skip to content

Commit bd446c7

Browse files
committed
Improve install script
1 parent 2b3f78d commit bd446c7

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

bin/install

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,21 @@ else
226226
exit 1
227227
fi
228228

229+
# Bootstrap LocalPreferences.toml for subprojects that need PythonCall.
230+
# Only copies the .default if no LocalPreferences.toml exists yet (e.g. fresh
231+
# clone). A subsequent run of bin/install_controlplots will add or update the
232+
# machine-specific settings on top.
233+
echo
234+
echo "Bootstrapping LocalPreferences.toml for subprojects..."
235+
for _lp_dir in examples_cp test; do
236+
_lp_file="${_lp_dir}/LocalPreferences.toml"
237+
_lp_default="${_lp_dir}/LocalPreferences.toml.default"
238+
if [[ ! -f "$_lp_file" && -f "$_lp_default" ]]; then
239+
cp "$_lp_default" "$_lp_file"
240+
echo " Created ${_lp_file} from default (CondaPkg disabled)."
241+
fi
242+
done
243+
229244
$_julia_cmd --project=. -e 'using Pkg; Pkg.precompile(); Pkg.activate("examples"); Pkg.precompile();
230245
Pkg.activate("examples_cp"); Pkg.precompile(); Pkg.activate("test"); Pkg.precompile();
231246
@info "Precompilation complete."'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[CondaPkg]
2+
backend = "Null"
3+
4+
[ENV]
5+
MPLBACKEND = "qtagg"

test/LocalPreferences.toml.default

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[CondaPkg]
2+
backend = "Null"

0 commit comments

Comments
 (0)