diff --git a/README.md b/README.md index 0c58c2b..2d9a1b6 100644 --- a/README.md +++ b/README.md @@ -71,12 +71,10 @@ Date: 19/06/2019 Author: E. Pallier (epallier@irap.omp.eu) -VERSION: 0.30.11 +VERSION: 0.30.12 Comment : -- Bugfixed AgentM -- Named test database "test_pyros" explicitely -- Keep test database test_pyros (do not delete it after tests) +- "./pyros install -p -d" => (-p = packages_only ; -d = -database_only) RAPPELS SUR L'UTILISATION : @@ -114,6 +112,13 @@ Full list of commits: https://gitlab.irap.omp.eu/epallier/pyros/commits/master (The new official changes history is here : https://tinyurl.com/pyros-dev#heading=h.2r55bflctpt5) +**19/06/2019 : v0.30.11 (EP)** + + - Bugfixed AgentM + - Named test database "test_pyros" explicitely + - Keep test database test_pyros (do not delete it after tests) + + **12/06-17/06/2019 : v0.30.3-9 (EP)** - Restructuration du projet - phase 1 : /src/ => /pyros_django/ diff --git a/install/install.py b/install/install.py index 0891682..006cb48 100755 --- a/install/install.py +++ b/install/install.py @@ -376,21 +376,28 @@ def install_database(venv): def _help(): print( - "Welcome in the installation script of the pyros venv.\t\nPlease launch it from the install directory of pyros.\n\tIf you're on Ubuntu Debian or CentOS:\n\tlaunch it with sudo and <--prerequisites> or <-p> to install the prerequisites.\n\t-->sudo ./test_install.py -p\n\n\tFor the python packages launch it from the install directory of pyros without sudo and without parameter\n\t-->./test_install.py") - + #"Welcome in the installation script of the pyros venv.\t\nPlease launch it from the install directory of pyros.\n\tIf you're on Ubuntu Debian or CentOS:\n\tlaunch it with sudo and <--prerequisites> or <-p> to install the prerequisites.\n\t-->sudo ./test_install.py -p\n\n\tFor the python packages launch it from the install directory of pyros without sudo and without parameter\n\t-->./test_install.py") + "Welcome to the installation script of the pyros software.\t\n" + \ + "Usage:\n" + \ + " [python] ./pyros.py install [-p] [-d]" + ) if __name__ == '__main__': - if (len(sys.argv) > 1): + if len(sys.argv) > 2: _help() ; sys.exit(1) + #print(sys.argv) + if len(sys.argv) == 2: + INSTALL_VENV = INSTALL_DB = False + if sys.argv[1] == '-p': INSTALL_VENV=True + if sys.argv[1] == '-d': INSTALL_DB=True + ''' + # Prerequisistes installation (for CentOS) => not a good idea for now, deactivated (EP) if sys.argv[1] == "--prerequisites" or sys.argv[1] == "-p": install_required() else: _help() - elif len(sys.argv) == 1: - if INSTALL_VENV: install_venv(VENV) - if INSTALL_DB: install_database(VENV) - - else: - _help() + ''' + if INSTALL_VENV: install_venv(VENV) + if INSTALL_DB: install_database(VENV) diff --git a/pyros.py b/pyros.py index cf85a33..f3130b3 100755 --- a/pyros.py +++ b/pyros.py @@ -288,16 +288,23 @@ def dbshell(): @pyros_launcher.command(help="Install the pyros software") +@click.option('--packages_only', '-p', is_flag=True, help='install only the python packages (no database installation)') +@click.option('--database_only', '-d', is_flag=True, help='install only the pyros database (no python packages installation)') #@global_test_options -def install(): +def install(packages_only, database_only): print("Running install command") + print("packages_only", packages_only) + print("database_only", database_only) #if test_mode(): print("in test mode") # self.execProcess("python3 install/install.py install") # if (os.path.basename(os.getcwd()) != "private"): start_dir = os.getcwd() os.chdir("install/") ; _in_dir("install") or die("Bad dir") # execProcess("python install.py install") - if not test_mode(): execProcess(PYTHON + " install.py") + option='' + if packages_only: option='-p' + if database_only: option='-d' + test_mode() or execProcess(PYTHON + " install.py " + option) # cd - # os.chdir("-") os.chdir(start_dir) ; _in_abs_dir(start_dir) or die("Bad dir") -- libgit2 0.21.2