File: build_conda_packed.sh

package info (click to toggle)
python-bumps 1.0.0b2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,144 kB
  • sloc: python: 23,941; xml: 493; ansic: 373; makefile: 209; sh: 91; javascript: 90
file content (27 lines) | stat: -rwxr-xr-x 690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

# Definitions
OUTPUT="conda_packed"
SCRIPT_DIR="$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")"
SRC_DIR="$(dirname "$SCRIPT_DIR")"

eval "$(conda shell.bash hook)"

if ! command -v conda-pack &> /dev/null; then
  conda install -y conda-pack
fi

ISOLATED_ENV="$(mktemp -d)/env"
conda create -y -p "$ISOLATED_ENV" "python=${PYTHON_VERSION:-3.12}" "nodejs" "micromamba" "pip"

cd "$SCRIPT_DIR"
conda activate "$ISOLATED_ENV"

python -m pip install --no-input --no-compile "..[webview]"
python -m "${PACKAGE_NAME:-bumps}.webview.build_client" --cleanup

conda deactivate
conda-pack -p "$ISOLATED_ENV" --format=no-archive --output="$SRC_DIR/$OUTPUT"

rm -rf "$ISOLATED_ENV"
# done