diff --git a/radiopadre_client/default_config.py b/radiopadre_client/default_config.py index 68c6a2d..8583f25 100644 --- a/radiopadre_client/default_config.py +++ b/radiopadre_client/default_config.py @@ -16,12 +16,15 @@ # change this to a proper patch release number for a real release __version__ = "1.2.pre1" +# set this to True to have auto-installs use git rather than pip, suitable dor dev branches etc. +# default convention is to use b1.2.x branch for version 1.2.preN +__install_from_branch__ = "b" + re.sub("pre.*", "x", __version__) if "pre" in __version__ else None + +__tag_prefix__ = "b" if __install_from_branch__ else "" + # if True, this is a stable release e.g. 1.1.0. If False, this is an dev version e.g. 1.1.x __release__ = re.match("^(\d+)\.(\d+)\.(\d+)$", __version__) -# git tag or branch to use: vXXX for releases and bXXX for devs -__tag_prefix__ = "b" # "v" if __release__ else "b" - # release x.y.z pulls x.y.latest image if __release__: __image_version__ = ".".join([__release__.group(1), __release__.group(2), "latest"]) @@ -43,12 +46,12 @@ GRIM_REAPER=True, REMOTE_RADIOPADRE_DIR="~/.radiopadre", CLIENT_INSTALL_PATH="~/radiopadre-client", - CLIENT_INSTALL_REPO="", #"https://github.com/ratt-ru/radiopadre-client.git", # empty for pip release - CLIENT_INSTALL_BRANCH=__tag_prefix__ + __version__, # change for each release + CLIENT_INSTALL_REPO="https://github.com/ratt-ru/radiopadre-client.git" if __install_from_branch__ else "", + CLIENT_INSTALL_BRANCH=__install_from_branch__, CLIENT_INSTALL_PIP="radiopadre-client", SERVER_INSTALL_PATH="~/radiopadre", - SERVER_INSTALL_REPO="", #"https://github.com/ratt-ru/radiopadre.git", # empty for pip release - SERVER_INSTALL_BRANCH=__tag_prefix__ + __version__, # change for each release + SERVER_INSTALL_REPO="https://github.com/ratt-ru/radiopadre.git" if __install_from_branch__ else "", + SERVER_INSTALL_BRANCH=__install_from_branch__, SERVER_INSTALL_PIP="radiopadre", SINGULARITY_IMAGE_DIR="", SINGULARITY_AUTO_BUILD=True, diff --git a/radiopadre_client/remote.py b/radiopadre_client/remote.py index a51943a..c1f5a58 100644 --- a/radiopadre_client/remote.py +++ b/radiopadre_client/remote.py @@ -265,8 +265,8 @@ def check_remote_command(command): install_path = f"git+{config.CLIENT_INSTALL_REPO}@{branch}" # now pip install - message(f"Doing pip install -e {install_path} in {config.RADIOPADRE_VENV}") - ssh_remote_v(f"source {config.RADIOPADRE_VENV}/bin/activate && {pip_install} -e {install_path}") + # message(f"Doing pip install -e {install_path} in {config.RADIOPADRE_VENV}") + # ssh_remote_v(f"source {config.RADIOPADRE_VENV}/bin/activate && {pip_install} -e {install_path}") # else, installing directly from pip elif config.CLIENT_INSTALL_PIP: message(f"--client-install-pip {config.CLIENT_INSTALL_PIP} is configured.")