python-for-android icon indicating copy to clipboard operation
python-for-android copied to clipboard

Existing distribution not detected due to pip package casing mismatch

Open pakal opened this issue 3 years ago • 0 comments

P4a kept rebuilding the entire android distribution for my project when i did "buildozer android deploy", I tracked down the bug to a simple case sensitivity mismatch here: https://github.com/kivy/python-for-android/blob/develop/pythonforandroid/distribution.py#L119

I had "Pillow" in my buildozer.spec dependencies, wherease the list stored in dist_info.json was lowercased:

[INFO]: >>>> custom logging >>>> recipe mismatch: Pillow not in ['freetype', 'hostpython3', 'jpeg', 'libffi', 'openssl', 'png', 'sdl2_image', 'sdl2_mixer', 'sdl2_ttf', 'sqlite3', 'python3', 'sdl2', 'pytz', 'setuptools', 'decorator', 'pillow', 'pycparser', 'six', 'cffi', 'pyjnius', 'android', 'kivy', 'pycryptodome', 'uuid0', 'kivymd', 'docutils', 'plyer', 'certifi', 'pymongo', 'multitimer', 'psutil']

Maybe P4a should do case insensitive comparison here? And maybe have some DEBUG logging to explain why an existing distribution is dismissed?

pakal avatar Sep 25 '21 14:09 pakal