Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix virtualenv for xenial #49
Conversation
stub42
reviewed
Mar 22, 2016
| @@ -31,7 +31,12 @@ def bootstrap_charm_deps(): | ||
| # if we're using a venv, set it up | ||
| if cfg.get('use_venv'): | ||
| if not os.path.exists(venv): | ||
| - apt_install(['python-virtualenv']) | ||
| + # note that the following two apt_installs *must* be done |
stub42
Mar 22, 2016
Contributor
charmhelpers.core.host.lsb_release() will tell you the release, allowing you to explicitly install the correct packages rather than rely on silent failures actually working.
|
Updated to explicitly check the series and just install the right package. |
marcoceppi
reviewed
May 2, 2016
| @@ -50,7 +51,11 @@ def bootstrap_charm_deps(): | ||
| # if we're using a venv, set it up | ||
| if cfg.get('use_venv'): | ||
| if not os.path.exists(venv): | ||
| - apt_install(['python-virtualenv']) | ||
| + distname, version, series = platform.linux_distribution() | ||
| + if series == 'trusty': |
|
LGTM |
marcoceppi
merged commit 04cb3bd
into
juju-solutions:master
May 8, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
johnsca commentedMar 18, 2016
In Xenial, the
python-virtualenvpackage was split in to three different packages:python-virtualenv,python3-virtualenv, andvirtualenvwith the latter installing the actual CLI command. Unfortunately,python-virtualenvonly recommendsvirtualenvso we have to manually install it on Xenial. It also doesn't exist on trusty, so that's fun.