diff --git a/.gitignore b/.gitignore index 44b097f98..e9cbd5d52 100644 --- a/.gitignore +++ b/.gitignore @@ -62,3 +62,4 @@ tools/developer_tools/bely-mqtt-message-broker/conda-bld tools/developer_tools/bely-mqtt-message-broker/dev-config tools/developer_tools/bely-mqtt-message-broker/conda-recipe/bely-mqtt-env.txt tools/developer_tools/bely-mqtt-message-broker/conda-recipe/src +tools/developer_tools/bely-cli/bely-cli-env.txt diff --git a/tools/developer_tools/bely-cli/conda-build.sh b/tools/developer_tools/bely-cli/conda-build.sh new file mode 100755 index 000000000..45cbbff12 --- /dev/null +++ b/tools/developer_tools/bely-cli/conda-build.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +ENV_NAME=bely-cli-env +CONDA_DIR=$CONDA_PREFIX_1 +echo $CONDA_DIR + +if [ -z $CONDA_DIR ] +then + CONDA_DIR=$CONDA_PREFIX +fi + +if [ -z $CONDA_DIR ] +then + echo '$CONDA_PRIFX must be defined.' + exit 1 +fi + +source $CONDA_DIR/etc/profile.d/conda.sh || exit 1 + +# Clean and Build +rm -rf ./build + +# Build CLI +conda build conda-recipe --output-folder ./build || exit 1 + +# Install build into a new env +conda create -n $ENV_NAME -y || exit 1 +conda activate $ENV_NAME || exit 1 +conda install bely-cli -c ./build -y || exit 1 + +# Export +conda list -n $ENV_NAME --explicit > $ENV_NAME.txt + + +conda activate +conda env remove -n $ENV_NAME + +echo "Please use the c2 tool to upload the $ENV_NAME.txt" diff --git a/tools/developer_tools/bely-cli/conda-recipe/meta.yaml b/tools/developer_tools/bely-cli/conda-recipe/meta.yaml index 7620beeb9..da067d109 100644 --- a/tools/developer_tools/bely-cli/conda-recipe/meta.yaml +++ b/tools/developer_tools/bely-cli/conda-recipe/meta.yaml @@ -1,12 +1,12 @@ {% set name = "bely-cli" %} -{% set version = "2026.10.0" %} +{% set version = "2026.10.2" %} package: name: "{{ name|lower }}" version: "{{ version }}" source: - path: ./src + path: .. build: number: 0 @@ -15,17 +15,18 @@ build: - bely-cli = bely_cli.cli:main requirements: - build: + host: - pip - - python>3.10 + - python >3.10 - setuptools run: - - python>3.10 + - python >3.10 - click - pyyaml - - bely-api - - textual + - bely-api==2026.10.0 + - textual >=8.2.8 - rich + - textual-image >=0.12.0 test: imports: @@ -34,9 +35,10 @@ test: - test requires: - python - - textual-image # optional at runtime (tui image rendering); here so tests exercise the real widget + - pytest + - pytest-xdist commands: - - python -m unittest discover -s test -v + - python -m pytest -n auto test - bely-cli -h about: