From 8a05074de7c534372277aca55d8db9d994aee312 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Fri, 4 Sep 2020 17:22:28 -0400 Subject: [PATCH] [FIX] Typo rename dependancy to dependency --- doc/POETRY.md | 2 +- .../{install_OSX_dependancy.sh => install_OSX_dependency.sh} | 0 ...tall_debian_dependancy.sh => install_debian_dependency.sh} | 2 +- script/install_dev.sh | 4 ++-- script/install_locally.sh | 2 +- script/install_production.sh | 2 +- script/poetry_add_build_dependancy.sh | 4 ---- script/poetry_add_build_dependency.sh | 2 ++ script/poetry_update.py | 4 ++-- 9 files changed, 10 insertions(+), 12 deletions(-) rename script/{install_OSX_dependancy.sh => install_OSX_dependency.sh} (100%) rename script/{install_debian_dependancy.sh => install_debian_dependency.sh} (98%) delete mode 100755 script/poetry_add_build_dependancy.sh diff --git a/doc/POETRY.md b/doc/POETRY.md index cfefa67..00bca00 100644 --- a/doc/POETRY.md +++ b/doc/POETRY.md @@ -7,7 +7,7 @@ Add your dependancies in files [requirements.txt](../requirements.txt) and run s This will search all requirements.txt files and update pyproject.toml, to run poetry update. ## Add manually dependancies -The automatic script will erase this dependancy, but you can add it for your locally test. +The automatic script will erase this dependency, but you can add it for your locally test. ```bash poetry add PYTHON_MODULE ``` diff --git a/script/install_OSX_dependancy.sh b/script/install_OSX_dependency.sh similarity index 100% rename from script/install_OSX_dependancy.sh rename to script/install_OSX_dependency.sh diff --git a/script/install_debian_dependancy.sh b/script/install_debian_dependency.sh similarity index 98% rename from script/install_debian_dependancy.sh rename to script/install_debian_dependency.sh index d8b6bf9..2d86cb1 100755 --- a/script/install_debian_dependancy.sh +++ b/script/install_debian_dependency.sh @@ -39,7 +39,7 @@ sudo su - postgres -c "createuser -s ${EL_USER}" 2> /dev/null || true #-------------------------------------------------- # Install Dependencies #-------------------------------------------------- -echo -e "\n--- Installing debian dependancy --" +echo -e "\n--- Installing debian dependency --" sudo apt-get install git build-essential wget libxslt-dev libzip-dev libldap2-dev libsasl2-dev node-less libpng12-0 gdebi-core libffi-dev -y sudo apt-get install libmariadbd-dev -y diff --git a/script/install_dev.sh b/script/install_dev.sh index 3572c4f..6c011d7 100755 --- a/script/install_dev.sh +++ b/script/install_dev.sh @@ -8,11 +8,11 @@ if [[ "${OSTYPE}" == "linux-gnu" ]]; then OS=$(lsb_release -si) if [[ "${OS}" == "Ubuntu" ]]; then echo "\n---- linux-gnu installation process started ----" - ./script/install_debian_dependancy.sh + ./script/install_debian_dependency.sh else echo "Your Linux system is not supported." fi elif [[ "${OSTYPE}" == "darwin"* ]]; then echo "\n---- Darwin installation process started ----" - ./script/install_OSX_dependancy.sh + ./script/install_OSX_dependency.sh fi diff --git a/script/install_locally.sh b/script/install_locally.sh index cc6812e..a545e76 100755 --- a/script/install_locally.sh +++ b/script/install_locally.sh @@ -216,7 +216,7 @@ if [[ ! -f ${VENV_REPO_PATH} ]]; then chmod +x ${VENV_PATH}/repo fi -echo -e "\n---- Installing poetry dependancy ----" +echo -e "\n---- Installing poetry dependency ----" ${VENV_PATH}/bin/pip install --upgrade pip #/home/"${USER}"/.poetry/bin/poetry env use ${PYTHON_EXEC} source $HOME/.poetry/env diff --git a/script/install_production.sh b/script/install_production.sh index 397fb0a..3fb6eab 100755 --- a/script/install_production.sh +++ b/script/install_production.sh @@ -2,7 +2,7 @@ . ./env_var.sh -./script/install_debian_dependancy.sh +./script/install_debian_dependency.sh echo -e "\n---- Create ERPLIBRE system user ----" sudo adduser --system --quiet --shell=/bin/bash --home=/${EL_USER} --gecos 'ERPLIBRE' --group ${EL_USER} diff --git a/script/poetry_add_build_dependancy.sh b/script/poetry_add_build_dependancy.sh deleted file mode 100755 index c7d37bc..0000000 --- a/script/poetry_add_build_dependancy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -source $HOME/.poetry/env -poetry add -vv $(grep -v ";" ./.venv/build_dependancy.txt | grep -v "*" | sed 's/==/@^/' ) -# poetry export -f ./.venv/build_dependency.txt --dev | poetry run -- pip install -r /dev/stdin diff --git a/script/poetry_add_build_dependency.sh b/script/poetry_add_build_dependency.sh index c35cf3e..ed6c928 100755 --- a/script/poetry_add_build_dependency.sh +++ b/script/poetry_add_build_dependency.sh @@ -1,3 +1,5 @@ #!/usr/bin/env bash source $HOME/.poetry/env poetry add -vv $(grep -v ";" ./.venv/build_dependency.txt | grep -v "*" ) +# poetry add -vv $(grep -v ";" ./.venv/build_dependency.txt | grep -v "*" | sed 's/==/@^/' ) +# poetry export -f ./.venv/build_dependency.txt --dev | poetry run -- pip install -r /dev/stdin diff --git a/script/poetry_update.py b/script/poetry_update.py index 1a17c2c..8947f30 100755 --- a/script/poetry_update.py +++ b/script/poetry_update.py @@ -212,10 +212,10 @@ def sorted_dependency_poetry(pyproject_filename): poetry = tool.get("poetry") if poetry: dependencies = poetry.get("dependencies") - python_dependencie = ("python", dependencies.get("python", '')) + python_dependency = ("python", dependencies.get("python", '')) lst_dependency = [(k, v) for k, v in dependencies.items() if k != "python"] lst_dependency = sorted(lst_dependency, key=lambda tup: tup[0]) - poetry["dependencies"] = OrderedDict([python_dependencie] + lst_dependency) + poetry["dependencies"] = OrderedDict([python_dependency] + lst_dependency) # Rewrite pyproject.toml with open(pyproject_filename, 'w') as f: