From aa3808045d6288dc0b7f2f03e9d134ed25654381 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:53:45 -0800 Subject: [PATCH 1/3] Fix sed syntax error --- recipe/post-link.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipe/post-link.sh b/recipe/post-link.sh index 46b0d0d..c52fdeb 100644 --- a/recipe/post-link.sh +++ b/recipe/post-link.sh @@ -1,13 +1,13 @@ #!/bin/bash set -e -[[ $(sed --version 2>/dev/null) ]] && opts=("-i" "-e") || opts=("-i" "" "-e") +[[ $(sed --version 2>/dev/null) ]] && opts=("-i" "-E") || opts=("-i" "" "-E") +menu="${PREFIX}/Menu/spyder-menu.json" if [[ -f "${PREFIX}/Menu/conda-based-app" ]]; then # Installed in installer environment, abridge shortcut name - menu="${PREFIX}/Menu/spyder-menu.json" - sed ${opts[@]} "s/ \(\{\{ ENV_NAME \}\}\)//g" $menu + sed "${opts[@]}" "s/ \(\{\{ ENV_NAME \}\}\)//g" $menu elif [[ -d "${PREFIX}/condabin" && -d "${PREFIX}/envs" ]]; then # Installed in a base environment, use distribution name - sed ${opts[@]} "s/ENV_NAME/DISTRIBUTION_NAME/g" $menu + sed "${opts[@]}" "s/ENV_NAME/DISTRIBUTION_NAME/g" $menu fi From 11eb82557571146e4a88e839bf84741a9d5611f3 Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Fri, 19 Jan 2024 07:30:52 -0800 Subject: [PATCH 2/3] Update macOS shortcut command to accommodate spaces in bundle name. $(dirname $0) allows bundle portablility (user renames bundle), but shell script requires "$(dirname "$0")" (yes, 2 sets of double quotes) if there is a space in the path. Unfortunately, menuisnt tries to be clever and quote the command, but does so incorrectly. $(dirname $0)/python -> "$(dirname $0)/python" $(dirname \"$0\")/python -> '$(dirname "$0")/python' \"$(dirname \"$0\")/python\" -> '"$(dirname "$0")/python"' The workaround is to use the precommand directive. Here menuinst does not try to clever quote and we can pushd to the directory. --- recipe/spyder-menu.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipe/spyder-menu.json b/recipe/spyder-menu.json index cdc070f..31e08c5 100644 --- a/recipe/spyder-menu.json +++ b/recipe/spyder-menu.json @@ -25,7 +25,8 @@ "StartupWMClass": "Spyder" }, "osx": { - "command": ["$(dirname $0)/python", "{{ PREFIX }}/bin/spyder", "$@"], + "precommand": "pushd \"$(dirname \"$0\")\" &>/dev/null", + "command": ["./python", "{{ PREFIX }}/bin/spyder", "$@"], "link_in_bundle": { "{{ PREFIX }}/bin/python": "{{ MENU_ITEM_LOCATION }}/Contents/MacOS/python" }, From f38cf3bea8c637b3da504675b2f9c3f9281c3efd Mon Sep 17 00:00:00 2001 From: Ryan Clary <9618975+mrclary@users.noreply.github.com> Date: Mon, 22 Jan 2024 08:20:40 -0800 Subject: [PATCH 3/3] Replace Graphics category with Development on Linux --- recipe/spyder-menu.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/spyder-menu.json b/recipe/spyder-menu.json index 31e08c5..20cf852 100644 --- a/recipe/spyder-menu.json +++ b/recipe/spyder-menu.json @@ -18,7 +18,7 @@ }, "linux": { "Categories": [ - "Graphics", + "Development", "Science" ], "command": ["{{ PREFIX }}/bin/spyder", "$@"],