From: Frank Brehm Date: Mon, 13 Jun 2022 09:26:41 +0000 (+0200) Subject: Updating bin/update-env.sh and adding fb_vmware to requirements.txt X-Git-Tag: 2.6.2~1^2~8^2~62 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=00f5ff012462da38f2254c98f081f3c883cb7bcc;p=pixelpark%2Fcreate-vmware-tpl.git Updating bin/update-env.sh and adding fb_vmware to requirements.txt --- diff --git a/bin/update-env.sh b/bin/update-env.sh index 049ece8..c4b18bf 100755 --- a/bin/update-env.sh +++ b/bin/update-env.sh @@ -7,7 +7,7 @@ VERBOSE="n" DEBUG="n" QUIET='n' -VERSION="2.2" +VERSION="2.3" # console colors: RED="" @@ -22,6 +22,8 @@ BASE_DIR=$( dirname "$( dirname "$0" )" ) cd "${BASE_DIR}" BASE_DIR=$( readlink -f . ) +declare -a VALID_PY_VERSIONS=("3.10" "3.9" "3.8" "3.7" "3.6") + PIP_OPTIONS= export VIRTUAL_ENV_DISABLE_PROMPT=y @@ -243,13 +245,6 @@ get_options() { exit 1 fi - if type -t virtualenv >/dev/null ; then - : - else - error "Command '${RED}virtualenv${NORMAL}' not found, please install package '${YELLOW}python-virtualenv${NORMAL}' or appropriate." - exit 6 - fi - if type -t msgfmt >/dev/null ; then : else @@ -268,7 +263,6 @@ get_options() { #------------------------------------------------------------------------------ init_venv() { - local -a valid_py_versions=("3.8" "3.7" "3.6" "3.5") local py_version= local python= local found="n" @@ -281,7 +275,7 @@ init_venv() { if [[ ! -f venv/bin/activate ]] ; then found="n" - for py_version in "${valid_py_versions[@]}" ; do + for py_version in "${VALID_PY_VERSIONS[@]}" ; do python="python${py_version}" debug "Testing Python binary '${CYAN}${python}${NORMAL}' …" if type -t "${python}" >/dev/null ; then @@ -289,14 +283,14 @@ init_venv() { empty_line info "Found '${GREEN}${python}${NORMAL}'." empty_line - virtualenv --python="${python}" venv + "${python}" -m venv venv break fi done if [[ "${found}" == "n" ]] ; then empty_line >&2 error "Did not found a usable Python version." >&2 - error "Usable Python versions are: ${YELLOW}${valid_py_versions[*]}${NORMAL}." >&2 + error "Usable Python versions are: ${YELLOW}${VALID_PY_VERSIONS[*]}${NORMAL}." >&2 empty_line >&2 exit 5 fi diff --git a/requirements.txt b/requirements.txt index 92767eb..02391f1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ paramiko Babel fb_logging fb_tools +fb_vmware