Skip to content

Commit 0382d27

Browse files
authored
Merge pull request #3360 from Fector101/fix/venv-clear-and-no-pip-upgrade
build: clear venv and skip pip self-upgrade to avoid stale pip corruption
2 parents 5c192d7 + d2ee8c5 commit 0382d27

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

pythonforandroid/build.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -868,15 +868,11 @@ def run_pymodules_install(ctx, arch, modules, project_dir=None,
868868
# Use our hostpython to create the virtualenv
869869
host_python = sh.Command(ctx.hostpython)
870870
with current_directory(join(ctx.build_dir)):
871-
shprint(host_python, '-m', 'venv', 'venv')
871+
shprint(host_python, '-m', 'venv', '--clear', 'venv')
872872

873-
# Prepare base environment and upgrade pip:
873+
# Prepare base environment:
874874
base_env = dict(copy.copy(os.environ))
875875
base_env["PYTHONPATH"] = ctx.get_site_packages_dir(arch)
876-
info('Upgrade pip to latest version')
877-
shprint(sh.bash, '-c', (
878-
"source venv/bin/activate && pip install -U pip"
879-
), _env=copy.copy(base_env))
880876

881877
# Install Cython in case modules need it to build:
882878
info('Install Cython in case one of the modules needs it to build')

0 commit comments

Comments
 (0)