summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2017-08-15 19:34:57 -0400
committerKali Kaneko <kali@leap.se>2017-08-16 17:30:20 -0400
commit135aa3ac99e0280e9f4e790077a1860369aa2bc9 (patch)
tree0b4d2b9c94b8682ba83db942e1c891271dab399b
parent9672d50008418645829c81cf21fa5dd79937ce8f (diff)
[docs] add ability to upgrade an existing virtualenv
-rw-r--r--Makefile28
-rw-r--r--README.rst9
-rwxr-xr-xpkg/tools/bitmask-bootstrap.sh4
-rw-r--r--pkg/tools/upgrade_all.py13
4 files changed, 40 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index bafdd336..db7f51e5 100644
--- a/Makefile
+++ b/Makefile
@@ -8,24 +8,28 @@ dev-bootstrap:
pkg/tools/bitmask-bootstrap.sh
dev-mail:
- pip install -e '.[mail]'
+ pip install -U -e '.[mail]'
dev-gui: install_pixelated
- pip install -e '.[gui]'
-dev-backend:
- pip install -e '.[backend]'
+ pip install -U -e '.[gui]'
-dev-latest-backend: dev-backend
- pip install -e 'git+https://0xacab.org/leap/leap_pycommon@master#egg=leap.common'
- pip install -e 'git+https://0xacab.org/leap/soledad@master#egg=leap.soledad'
+dev-backend:
+ pip install -U -e '.[backend]'
dev-all: install_pixelated
pip install -I --install-option="--bundled" pysqlcipher
- pip install -e '.[all]'
+ pip install -U -e '.[all]'
+
+dev-latest-leap:
+ pip install -U -e 'git+https://0xacab.org/leap/leap_pycommon@master#egg=leap.common'
+ pip install -U -e 'git+https://0xacab.org/leap/soledad@master#egg=leap.soledad'
+
+dev-latest-backend: dev-backend dev-latest-leap
+
+dev-latest-all: dev-all dev-latest-leap
-dev-latest-all: dev-all
- pip install -e 'git+https://0xacab.org/leap/leap_pycommon@master#egg=leap.common'
- pip install -e 'git+https://0xacab.org/leap/soledad@master#egg=leap.soledad'
+upgrade-all:
+ python pkg/tools/upgrade_all.py
uninstall:
pip uninstall leap.bitmask
@@ -38,7 +42,7 @@ test_e2e:
tests/e2e/e2e-test-vpn.sh
test_functional_setup:
- pip install behave selenium
+ pip install -U behave selenium
test_functional:
xvfb-run --server-args="-screen 0 1280x1024x24" behave --tags ~@wip --tags @smoke tests/functional/features -k --no-capture -D host=localhost
diff --git a/README.rst b/README.rst
index c19dab96..57c973ba 100644
--- a/README.rst
+++ b/README.rst
@@ -113,6 +113,15 @@ debian-based system, you can try::
make dev-bootstrap
+To upgrade regularly the python dependencies installed inside your virtualenv,
+you can run::
+
+ make upgrade-all
+
+inside your virtualenv, and it will install any new version of your
+dependencies that is found in pypi.
+
+
Run headless backend in development mode
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
diff --git a/pkg/tools/bitmask-bootstrap.sh b/pkg/tools/bitmask-bootstrap.sh
index 86d98791..3f494ccf 100755
--- a/pkg/tools/bitmask-bootstrap.sh
+++ b/pkg/tools/bitmask-bootstrap.sh
@@ -41,8 +41,8 @@ function clone_repo()
function install_deps()
{
- cd ~/leap/bitmask-dev && pew in bitmask pip install -r pkg/requirements-dev.pip
- cd ~/leap/bitmask-dev && pew in bitmask pip install -r pkg/requirements-testing.pip
+ cd ~/leap/bitmask-dev && pew in bitmask pip install -U -r pkg/requirements-dev.pip
+ cd ~/leap/bitmask-dev && pew in bitmask pip install -U -r pkg/requirements-testing.pip
cd ~/leap/bitmask-dev && pew in bitmask make dev-all
}
diff --git a/pkg/tools/upgrade_all.py b/pkg/tools/upgrade_all.py
new file mode 100644
index 00000000..5db9c172
--- /dev/null
+++ b/pkg/tools/upgrade_all.py
@@ -0,0 +1,13 @@
+import os
+import sys
+
+import pip
+from subprocess import call
+
+if not os.environ.get('VIRTUAL_ENV'):
+ print('[!] Should call this script inside a virtualenv, I do not want to mess '
+ 'with your system. Bye!')
+ sys.exit(1)
+
+for dist in pip.get_installed_distributions():
+ call("pip install --upgrade " + dist.project_name, shell=True)