Merged
Conversation
…k on corporate networks
akshayaurora
previously approved these changes
Jun 10, 2025
Member
|
@broccoliboy would you please look at and fix the issues with tests. |
kuzeyron
reviewed
Oct 25, 2025
buildozer/targets/android.py
Outdated
| kwargs['cwd'] = kwargs.get('cwd', android_sdk_dir) | ||
| command = [self.sdkmanager_path, f"--sdk_root={android_sdk_dir}", *args] | ||
|
|
||
| http_proxy = os.environ.get('HTTP_PROXY', os.environ.get('http_proxy')) |
Contributor
There was a problem hiding this comment.
HTTPS should be included with these checks.
Contributor
Author
There was a problem hiding this comment.
Thanks for reviewing. I updated to look at http and https env vars. Please let me know if you have any other feedback.
kuzeyron
reviewed
Nov 4, 2025
buildozer/targets/android.py
Outdated
| # only pass host and port with `http` type. | ||
| for key in ['HTTP_PROXY', 'http_proxy', 'HTTPS_PROXY', 'https_proxy']: | ||
| proxy = os.environ.get(key) | ||
| if proxy: |
Contributor
There was a problem hiding this comment.
If statement could be removed and just have try/except there
kuzeyron
reviewed
Nov 4, 2025
buildozer/targets/android.py
Outdated
| for key in ['HTTP_PROXY', 'http_proxy', 'HTTPS_PROXY', 'https_proxy']: | ||
| proxy = os.environ.get(key) | ||
| try: | ||
| host, port = proxy.split(':')[-2:] |
Contributor
There was a problem hiding this comment.
proxy = os.environ.get(key) could be set directly with host, port = proxy.split(':')[-2:] so it becomes host, port = os.environ.get(key).split(':')[-2:]
kuzeyron
approved these changes
Nov 4, 2025
Contributor
|
LGTM! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR configures android sdkmanager to use system proxy info from env var http_proxy, which is needed for buildozer android to work on corporate networks with a proxy in place. Related to #142 but this seems like a simpler implementation that leverages env vars that are typically already defined while working in a corporate proxy setting.