From 72062c1432f71f83eee7214986b955ba494ea7d1 Mon Sep 17 00:00:00 2001 From: Sam Martin Date: Mon, 17 Mar 2025 16:39:25 -0500 Subject: [PATCH] pass common proxy env vars to recipe env to fix pip build issues on corporate networks --- pythonforandroid/recipe.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pythonforandroid/recipe.py b/pythonforandroid/recipe.py index 44469aef2..b19d90b22 100644 --- a/pythonforandroid/recipe.py +++ b/pythonforandroid/recipe.py @@ -526,6 +526,11 @@ def get_recipe_env(self, arch=None, with_flags_in_cc=True): if arch is None: arch = self.filtered_archs[0] env = arch.get_env(with_flags_in_cc=with_flags_in_cc) + + for proxy_key in ['HTTP_PROXY', 'http_proxy', 'HTTPS_PROXY', 'https_proxy']: + if proxy_key in environ: + env[proxy_key] = environ[proxy_key] + return env def prebuild_arch(self, arch):