Skip to content

Discussion: should the default recipe set for python3 unconditionally include libffi to build ctypes? What about sqlite3 and other core modules? #1576

Description

I understand that not including libffi and ctypes brings down file size, but given it's such a basic component of so many other libs and recipes (which often use it to interface with native code), I wonder if maybe it should be made part of the built-in default recipe set and always included?

Because this error isn't super intuitive for beginners, and not something one would expect for a built-in module:

[INFO]:    Building setuptools for armeabi-v7a
[INFO]:    setuptools apparently isn't already in site-packages
[INFO]:    Installing setuptools into site-packages
[INFO]:    -> directory context /root/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools
[DEBUG]:   -> running python setup.py install -O2 --root=/root/.local/share/python-for-android/build/python-installs/unnamed_dist_1 --install-lib=.
[DEBUG]:   	Traceback (most recent call last):
[DEBUG]:   	  File "setup.py", line 11, in <module>
[DEBUG]:   	    import setuptools
[DEBUG]:   	  File "/root/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/__init__.py", line 14, in <module>
[DEBUG]:   	    from setuptools.dist import Distribution, Feature
[DEBUG]:   	  File "/root/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/dist.py", line 25, in <module>
[DEBUG]:   	    from setuptools import windows_support
[DEBUG]:   	  File "/root/.local/share/python-for-android/build/other_builds/setuptools-python3/armeabi-v7a__ndk_target_21/setuptools/setuptools/windows_support.py", line 2, in <module>
[DEBUG]:   	    import ctypes
[DEBUG]:   	  File "/root/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/Lib/ctypes/__init__.py", line 7, in <module>
[DEBUG]:   	    from _ctypes import Union, Structure, Array
[DEBUG]:   	ModuleNotFoundError: No module named '_ctypes'

Edit: cffi -> libffi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions