Skip to content

Commit

Permalink
feat: upgrade python packages when deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasts committed Aug 2, 2017
1 parent a615b69 commit 37050eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ You can customize this behavior, see the next section for more details.
There are two ways to list the applications dependencies: ``requirements.txt`` or ``setup.py``.
The priority order is: requirements -> setup. The file should be in the root of deploy files.

packages will be upgrade to specified version or last stable version


### Using requirements.txt

You can define a file called ``requirements.txt`` that list all pip dependencies of your application,
Expand Down Expand Up @@ -56,4 +59,4 @@ You can also define the setup script to list your depencies, here's an example:
)

After invokin ``git push`` or ``tsuru app-deploy``, tsuru will receive your code and tell the platform
to install all the depencies using ``pip install -r requirements.txt`` or ``pip instal -e ./``.
to install all the depencies using ``pip install --upgrade -r requirements.txt`` or ``pip instal --upgrade -e ./``.
4 changes: 2 additions & 2 deletions python/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ pyenv global $APP_VENV

echo_debug "*** $0: About to do pip install (pwd: $(pwd))"
if [ -f "${CURRENT_DIR}/requirements.txt" ]; then
pip install -r ./requirements.txt
pip install --upgrade -r ./requirements.txt
elif [ -f "${CURRENT_DIR}/setup.py" ]; then
pip install -e .
pip install --upgrade -e .
fi
popd

0 comments on commit 37050eb

Please sign in to comment.