Tidy virtual-env creation script

This commit is contained in:
Max Howell 2022-12-20 07:51:18 -05:00
parent a55998598f
commit fea7d8ad6d
2 changed files with 11 additions and 12 deletions

View file

@ -10,8 +10,7 @@ dependencies:
gnu.org/bash: '>=2' # for our venv/relocation scripts: feel free to fix that
build:
script: |
python-venv.sh meson mesonbuild.com {{version}} {{prefix}} {{deps.python.org.version}} {{deps.python.org.version.major}} {{deps.python.org.version.minor}}
python-venv.sh "{{prefix}}/bin/meson"
test:
dependencies:

View file

@ -1,12 +1,12 @@
#!/bin/sh
CMD_NAME=$1
PROJECT_NAME=$2
VERSION=$3
PREFIX=$4
PYTHON_VERSION=$5
PYTHON_VERSION_MAJ=$6
PYTHON_VERSION_MIN=$7
CMD_NAME=$(basename "$1")
PREFIX="$(dirname "$(dirname "$1")")"
PROJECT_NAME=$(basename "$(dirname "$PREFIX")")
VERSION=$(basename "$PREFIX")
PYTHON_VERSION=$(python --version | cut -d' ' -f2)
PYTHON_VERSION_MAJ=$(echo $PYTHON_VERSION | cut -d. -f1)
PYTHON_VERSION_MIN=$(echo $PYTHON_VERSION | cut -d. -f1,2)
python -m venv $PREFIX/libexec