Skip to content

python3 recipe patch 3.14_armv7l_fix.patch fails to apply (No file to patch, rejects in Lib/sysconfig/__init__.py) on macOS (Buildozer, p4a develop) #3273

@yves-surrel

Description

@yves-surrel

Bug: python3 recipe patch 3.14_armv7l_fix.patch fails to apply on macOS (Buildozer / p4a develop)

Description

When building an Android app with Buildozer on macOS, the build fails during the
python3 recipe patch step in python-for-android.

The patch:

pythonforandroid/recipes/python3/patches/3.14_armv7l_fix.patch

fails to apply with:

No file to patch.  Skipping...
1 out of 1 hunks ignored--saving rejects to 'Lib/sysconfig/__init__.py.rej'

The build then aborts due to the patch failure.

The reject file shows that the patch attempts to modify the following mapping in
Lib/sysconfig/__init__.py:

- "armv7l": "armeabi_v7a",
+ "arm":    "armeabi_v7a",

However, the patch context does not match the CPython sources being built, resulting in a
hard failure.


Steps to Reproduce

  1. Create a minimal Kivy app:

main.py

from kivy.app import App
from kivy.uix.label import Label

class MinimalApp(App):
    def build(self):
        return Label(text="Hello from p4a repro")

if __name__ == "__main__":
    MinimalApp().run()
  1. Use the following minimal buildozer.spec:
[app]
title = p4a_patch_repro
package.name = p4apatchrepro
package.domain = org.example

source.dir = .
version = 0.1

requirements = python3==3.11.10,kivy
android.archs = armeabi-v7a, arm64-v8a

p4a.branch = develop
  1. Build:
buildozer android clean
TMPDIR="$HOME/.tmp_buildozer" buildozer -v android debug

Expected Behavior

The python3 recipe patches should apply cleanly and the build should proceed.


Actual Behavior

The build fails during patch application:

Applying patch patches/3.14_armv7l_fix.patch
No file to patch. Skipping...
1 out of 1 hunks ignored--saving rejects to 'Lib/sysconfig/__init__.py.rej'

Environment

  • Host OS: macOS 26.1 (Apple Silicon, arm64)
  • Python (host): 3.11.10 / 3.11.13 (both tested)
  • Buildozer: 1.5.0
  • python-for-android: develop branch (Buildozer-managed checkout)
  • NDK API: 24
  • Android archs: armeabi-v7a, arm64-v8a

Additional Notes

  • The same project builds successfully on another macOS machine using an older
    python-for-android checkout, suggesting a regression or patch/source mismatch.
  • The patch name suggests armv7, but it is applied unconditionally, including during
    arm64-v8a python3 builds.
  • This appears to be a recipe/patch mismatch rather than a project configuration issue.

Request

Please verify whether 3.14_armv7l_fix.patch is still applicable to the Python sources
used by the current develop branch.

If the patch is required only for specific Python versions or architectures, it may need
conditional application, updating, or removal to avoid breaking the build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions