From 73bdebbf1aa34ea762224a165ca98ba75dc45f42 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Wed, 6 Feb 2019 21:44:16 +0200 Subject: [PATCH 1/2] added python3 support to pip virtualenv setup --- modules/pip.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/modules/pip.py b/modules/pip.py index 88b5ba1..61a21de 100644 --- a/modules/pip.py +++ b/modules/pip.py @@ -13,7 +13,7 @@ ERROR_BAD_PARAM = -2 @task -def setup_virtualenv(): +def setup_virtualenv(python3=False): configuration = env.config if env.debug: @@ -21,11 +21,18 @@ def setup_virtualenv(): format='\n%(levelname)s: deploy.setup_virtualenv %(message)s', level=logging.DEBUG) - mkvirtualenv_cmd = "mkvirtualenv --no-site-packages " \ - "{virtualenv_name}".format( - virtualenv_name=configuration.virtualenv.name) + mkvirtualenv_cmd = "mkvirtualenv --no-site-packages " + + if python3: + mkvirtualenv_cmd += "--python=python3 " + + mkvirtualenv_cmd += "{virtualenv_name}".format( + virtualenv_name=configuration.virtualenv.name) if env.debug: + + logging.debug("python3 install: %s" % python3) + logging.debug("virtualenv.workon : %s" % configuration.virtualenv.workon) @@ -41,6 +48,8 @@ def setup_virtualenv(): logging.debug("virtualenv.paths.root : %s" % configuration.virtualenv.paths.root) + logging.debug("mkvirtualenv_cmd: %s" % mkvirtualenv_cmd) + logging.debug("with virtualenv_source(): run(\"\n\t%s\n\t\")".format( mkvirtualenv_cmd)) else: From d25fde92ad23146a20256e25eeff2c5ff273ae48 Mon Sep 17 00:00:00 2001 From: Ronny Abraham Date: Sun, 23 Jun 2019 18:25:07 +0300 Subject: [PATCH 2/2] readdme --- readme.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..e69de29