summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2017-01-30 18:46:17 +0000
committerJavier Jardón <jjardon@gnome.org>2017-01-30 20:10:11 +0000
commit5548018f40b9bfc2ba0c7144782dc86a7b855250 (patch)
tree5f1156930333693be1459fa0b405c5cc329967e3
parentb2a81bd59116674f0d774a0eaaca9b2b928465fe (diff)
downloadybd-jjardon/virtualenv_pep8.tar.gz
install_dependencies.sh: Use virtualenvjjardon/virtualenv_pep8
-rw-r--r--.gitlab-ci.yml4
-rwxr-xr-xinstall_dependencies.sh25
2 files changed, 15 insertions, 14 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f28700..11e49a6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -3,6 +3,7 @@ image: python:2.7-slim
before_script:
- sh ./install_dependencies.sh
- git clone git://git.baserock.org/baserock/baserock/definitions ../definitions
+- source YBD_ENV/bin/activate
cache:
paths:
@@ -17,7 +18,8 @@ stages:
check_pep8:
stage: pep8
- script: "pycodestyle --show-source --show-pep8"
+ script:
+ - pycodestyle --show-source --show-pep8 --exclude=YBD_ENV
cache_keys_v1:
stage: cache_keys
diff --git a/install_dependencies.sh b/install_dependencies.sh
index 1b9e6ed..6841cd0 100755
--- a/install_dependencies.sh
+++ b/install_dependencies.sh
@@ -32,7 +32,7 @@ installed=false
command -v apt-get >/dev/null 2>&1
if [ $? -eq 0 ]; then
$SUDO apt-get -qq update
- $SUDO apt-get -qq install build-essential gawk git m4 wget python python-dev git
+ $SUDO apt-get -qq install build-essential gawk git m4 wget python python-dev git python-pip
if [ $? -ne 0 ]; then
echo "Install failed"
exit 1
@@ -43,7 +43,7 @@ fi
# install for fedora
command -v dnf >/dev/null 2>&1
if [ $? -eq 0 ] && [ $installed = false ]; then
- $SUDO dnf install -y which make automake gcc gcc-c++ gawk git m4 wget python python-devel git redhat-rpm-config
+ $SUDO dnf install -y which make automake gcc gcc-c++ gawk git m4 wget python python-devel git redhat-rpm-config python-pip
if [ $? -ne 0 ]; then
echo "Install failed"
exit 1
@@ -54,7 +54,7 @@ fi
# install for aws
command -v yum >/dev/null 2>&1
if [ $? -eq 0 ] && [ $installed = false ]; then
- $SUDO yum install -y which make automake gcc gcc-c++ gawk git m4 wget python python-devel git
+ $SUDO yum install -y which make automake gcc gcc-c++ gawk git m4 wget python python-devel git python-pip
if [ $? -ne 0 ]; then
echo "Install failed"
exit 1
@@ -65,7 +65,7 @@ fi
# install for Arch
command -v pacman >/dev/null 2>&1
if [ $? -eq 0 ] && [ $installed = false ]; then
- $SUDO pacman -S --noconfirm which make automake gcc gawk git m4 wget python2 git
+ $SUDO pacman -S --noconfirm which make automake gcc gawk git m4 wget python2 git python2-pip
if [ $? -ne 0 ]; then
echo "Install failed"
exit 1
@@ -78,14 +78,13 @@ if [ $installed = false ]; then
exit 1
fi
-pip --version 2>&1 > /dev/null
-if [ $? -ne 0 ]; then
- wget https://bootstrap.pypa.io/get-pip.py
- chmod +x get-pip.py
- $SUDO ./get-pip.py
- $SUDO rm get-pip.py
-fi
+$SUDO pip install virtualenv
+
+virtualenv YBD_ENV
-$SUDO pip install -U pip
+YBD_ENV/bin/pip install -r requirements.freeze.txt
-$SUDO pip install -r requirements.freeze.txt
+echo "A virtual environment has been created in YBD_ENV:"
+echo ""
+echo "Type 'source YBD_ENV/bin/activate' to begin use it"
+echo "When you are done, type 'deactivate' to deactivate it"