don't use pip --user for installing p4a if we are in a virtualenv or a conda env. Closes #509. Closes #515

This commit is contained in:
Mathieu Virbel 2017-12-15 16:13:18 +01:00
parent ea3c3b58db
commit 2e1675164e

View file

@ -527,7 +527,12 @@ class TargetAndroid(Target):
pip_deps = []
for dep in deps:
pip_deps.append('"{}"'.format(dep))
cmd('pip install -q --user {}'.format(" ".join(pip_deps)))
# in virtualenv or conda env
options = "--user"
if "VIRTUAL_ENV" in os.environ or "CONDA_PREFIX" in os.environ:
options = ""
cmd('pip install -q {} {}'.format(options, " ".join(pip_deps)))
def get_available_packages(self):
available_modules = self.buildozer.cmd('./distribute.sh -l',