Skip to content

Commit 7740a24

Browse files
committed
🐛 Adds missing explicit urllib3 sub dependency
The `requests` module has `urllib3` as dependency. This used to be handled dynamically thanks to the `requests` recipe. This is a drawback and side effect of kivy#2202. The on device error was: ``` Imported unittest loading tests... running unittest... unittest result is: ....EE........ ====================================================================== ERROR: test_import_module (tests.test_requirements.RequestsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/app/testapps/on_device_unit_tests/build/bdist.android-armeabi-v7a/test_app/tests/mixin.py", line 17, in test_import_module File "/home/user/.local/share/python-for-android/build/other_builds/python3/armeabi-v7a__ndk_target_21/python3/Lib/importlib/__init__.py", line 127, in import_module File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/home/user/.local/share/python-for-android/build/python-installs/bdist_unit_tests_app/requests/__init__.py", line 43, in <module> ModuleNotFoundError: No module named 'urllib3' ====================================================================== ERROR: test_run_module (tests.test_requirements.RequestsTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/user/app/testapps/on_device_unit_tests/build/bdist.android-armeabi-v7a/test_app/tests/test_requirements.py", line 74, in test_run_module File "/home/user/.local/share/python-for-android/build/python-installs/bdist_unit_tests_app/requests/__init__.py", line 43, in <module> ModuleNotFoundError: No module named 'urllib3' ---------------------------------------------------------------------- Ran 14 tests in 0.591s FAILED (errors=2) Ran tests ```
1 parent bff8a2a commit 7740a24

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ testapps-with-numpy/%: virtualenv
3838
$(eval $@_APP_ARCH := $(shell basename $*))
3939
. $(ACTIVATE) && cd testapps/on_device_unit_tests/ && \
4040
python setup.py apk --sdk-dir $(ANDROID_SDK_HOME) --ndk-dir $(ANDROID_NDK_HOME) \
41-
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,sqlite3,setuptools,numpy \
41+
--requirements libffi,sdl2,pyjnius,kivy,python3,openssl,requests,urllib3,sqlite3,setuptools,numpy \
4242
--arch=$($@_APP_ARCH)
4343

4444
testapps/%: virtualenv

testapps/on_device_unit_tests/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
app requirements via the dictionary `options`. Here you have some examples
1313
to build the supported app modes::
1414
15-
- kivy *basic*: `sqlite3,libffi,openssl,pyjnius,kivy,python3,requests`
15+
- kivy *basic*: `sqlite3,libffi,openssl,pyjnius,kivy,python3,requests,urllib3`
1616
- kivy *images/graphs*: `kivy,python3,numpy,matplotlib,Pillow`
1717
- kivy *encryption*: `kivy,python3,cryptography,pycryptodome,scrypt,
1818
m2crypto,pysha3`
@@ -39,7 +39,7 @@
3939
'apk':
4040
{
4141
'requirements':
42-
'sqlite3,libffi,openssl,pyjnius,kivy,python3,requests',
42+
'sqlite3,libffi,openssl,pyjnius,kivy,python3,requests,urllib3',
4343
'android-api': 27,
4444
'ndk-api': 21,
4545
'dist-name': 'bdist_unit_tests_app',

0 commit comments

Comments
 (0)