ENHACEMENT: warn about potential patch apply errors when package version requested don't match recipe
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- build-system, cli
Research direction
Start at the p4a apk --requirements entry point and trace how a requested package version is compared with the Pillow recipe version before setup.py.patch is applied. Reproduce the mismatch with pillow==7.1, then verify that the command clearly warns users when a recipe patch may fail because the requested version differs.
Written by the indexing model from the issue text.
Description
User can specify package version with --requirements option:
p4a apk --requirements=python3,pillow==7.1
Then p4a will download specified version instead of the one defined in the Pillow recipe. This recipe has patches to apply, and p4a will fail trying to do so because patch almost always strictly requires the exact input files of the particular package version - the package version which is specified in the recipe itself:
self.handle_command_exit_code(exit_code)
File "/home/u1/.local/share/pipx/venvs/python-for-android/lib64/python3.11/site-packages/sh.py", line 821, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /usr/bin/patch -t -d /home/u1/.local/share/python-for-android/build/other_builds/Pillow/armeabi-v7a__ndk_target_24/Pillow -p1 -i /home/u1/.local/share/pipx/venvs/python-for-android/lib/python3.11/site-packages/pythonforandroid/recipes/Pillow/setup.py.patch
STDOUT:
patching file setup.py
Hunk #1 FAILED at 39.
Hunk #2 succeeded at 156 with fuzz 1 (offset 6 lines).
Hunk #3 FAILED at 461.
Hunk #4 succeeded at 400 with fuzz 2 (offset -96 lines).
Hunk #5 FAILED at 507.
Hunk #6 succeeded at 500 (offset -107 lines).
3 out of 6 hunks FAILED -- saving rejects to file setup.py.rej
Suggestion: warn user clearly that the package version he requested does not match the recipe version, and the patch is likely to fail.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 2k
- Avg merge
- 12h 20m
- Merged PRs (30d)
- 9
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from kivy/python-for-android
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kivy/python-for-android#3335 · 1 comment · 3 reactions ·
-
Documentation easy
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
kivy/python-for-android#3326 · 1 comment ·
-
Documentation easy Priority: Low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
kivy/python-for-android#3299 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
kivy/python-for-android#3382 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
kivy/python-for-android#3381 ·
All issues in kivy/python-for-android
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·