From 2d7c7a40c1ee4b4863f11def7403dbf66c493085 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Thu, 19 Jan 2023 10:16:05 -0500 Subject: [PATCH] =?UTF-8?q?All=20@jonchang=E2=80=99s=20suggestions=20for?= =?UTF-8?q?=20py-venvs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs: https://github.com/teaxyz/pantry.extra/pull/93#issuecomment-1372917672 --- projects/mesonbuild.com/package.yml | 2 +- scripts/brewkit/python-venv.sh | 25 +++++++------------------ 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/projects/mesonbuild.com/package.yml b/projects/mesonbuild.com/package.yml index cf751081..471f835b 100644 --- a/projects/mesonbuild.com/package.yml +++ b/projects/mesonbuild.com/package.yml @@ -1,5 +1,5 @@ distributable: - url: https://github.com/mesonbuild/meson/releases/download/{{ version }}/meson-{{ version }}.tar.gz + url: https://github.com/mesonbuild/meson/releases/download/{{version}}/meson-{{version}}.tar.gz strip-components: 1 versions: diff --git a/scripts/brewkit/python-venv.sh b/scripts/brewkit/python-venv.sh index 11ccd7a5..8e5582fa 100755 --- a/scripts/brewkit/python-venv.sh +++ b/scripts/brewkit/python-venv.sh @@ -17,28 +17,17 @@ cd "$PREFIX" libexec/bin/pip install -v --no-binary :all: --ignore-installed $CMD_NAME mkdir bin -mv libexec/bin/$CMD_NAME libexec/bin/teaxyz.py - -cd bin -ln -s ../libexec/bin/$CMD_NAME $CMD_NAME - -cd ../libexec/bin -fix-shebangs.ts * - -cat <$CMD_NAME +cat <bin/$CMD_NAME #!/usr/bin/env bash self="\${BASH_SOURCE[0]}" -if test -L "\$self"; then - prefix="\$(dirname "\$self")" - suffix="\$(dirname \$(readlink \$self))" - LIBEXEC="\$(cd \$prefix/\$suffix && pwd)" -else - LIBEXEC="\$(cd "\$(dirname "\$self")" && pwd)" -fi +LIBEXEC="\$(cd "\$(dirname "\$self")"/../libexec/bin && pwd)" source "\$LIBEXEC/activate" -exec "\$LIBEXEC"/teaxyz.py "\$@" +exec "\$LIBEXEC"/$CMD_NAME "\$@" EOF -chmod +x $CMD_NAME +chmod +x bin/$CMD_NAME + +cd libexec/bin +fix-shebangs.ts * rm Activate.ps1 activate.csh activate.fish