-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
This is a matter of preference.
When running consecutive builds, I myself prefer the output to be as similar as possible, thriving for 100% match - this becomes more useful when looking for difference from a former build, and reducing the "noise".
Python set
s are a very common pitfall for this, as the order is not guaranteed, so for running the same build twice you would get the log Will compile for the following archs: arm64-v8a, armeabi-v7a
and right after it Will compile for the following archs: armeabi-v7a, arm64-v8a
.
Same "issue" with the log Dist will also contain modules (pillow~=10.1, kivymd~=1.1, kivy~=2.2) installed from pip
vs Dist will also contain modules (kivy~=2.2, pillow~=10.1, kivymd~=1.1) installed from pip
.
The fix is as easy as swapping the list
to sorted
, would gladly open the PR myself, but first would like to get some feedback as for whether it matters to anyone besides me, or this issue is a nuisance.
Side note: There can be more places with the same "issue", if this issue is accepted, possibly more PRs would follow.
python-for-android/pythonforandroid/build.py
Lines 396 to 407 in 436d5a9
def set_archs(self, arch_names): | |
all_archs = self.archs | |
new_archs = set() | |
for name in arch_names: | |
matching = [arch for arch in all_archs if arch.arch == name] | |
for match in matching: | |
new_archs.add(match) | |
self.archs = list(new_archs) | |
if not self.archs: | |
raise BuildInterruptingException('Asked to compile for no Archs, so failing.') | |
info('Will compile for the following archs: {}'.format( | |
', '.join(arch.arch for arch in self.archs))) |
python-for-android/pythonforandroid/graph.py
Line 340 in 436d5a9
python_modules = list(set(python_modules)) |