From 5df11be775eadcc19774e5bb118ee407330b8d83 Mon Sep 17 00:00:00 2001 From: HyTurtle <81598434+HyTurtle@users.noreply.github.com> Date: Fri, 26 May 2023 07:28:40 +0100 Subject: [PATCH] Update `cffi` recipe for Python 3.10 (#2800) * Update __init__.py version bump to 1.15.1 * Update disable-pkg-config.patch adjust patch for 1.15.1 --- pythonforandroid/recipes/cffi/__init__.py | 2 +- .../recipes/cffi/disable-pkg-config.patch | 20 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/pythonforandroid/recipes/cffi/__init__.py b/pythonforandroid/recipes/cffi/__init__.py index a198a3db0d..f0c25a92c9 100644 --- a/pythonforandroid/recipes/cffi/__init__.py +++ b/pythonforandroid/recipes/cffi/__init__.py @@ -7,7 +7,7 @@ class CffiRecipe(CompiledComponentsPythonRecipe): Extra system dependencies: autoconf, automake and libtool. """ name = 'cffi' - version = '1.13.2' + version = '1.15.1' url = 'https://pypi.python.org/packages/source/c/cffi/cffi-{version}.tar.gz' depends = ['setuptools', 'pycparser', 'libffi'] diff --git a/pythonforandroid/recipes/cffi/disable-pkg-config.patch b/pythonforandroid/recipes/cffi/disable-pkg-config.patch index cf2abd5b86..b1a5ff9b4c 100644 --- a/pythonforandroid/recipes/cffi/disable-pkg-config.patch +++ b/pythonforandroid/recipes/cffi/disable-pkg-config.patch @@ -1,19 +1,19 @@ -diff --git a/setup.py b/setup.py -index c1db368..57311c3 100644 +diff --git a/setup.py b/setup copy.py +index 4ce0007..9be4a6d 100644 --- a/setup.py -+++ b/setup.py -@@ -5,8 +5,7 @@ import errno ++++ b/setup +@@ -9,8 +9,7 @@ if sys.platform == "win32": sources = ['c/_cffi_backend.c'] libraries = ['ffi'] -include_dirs = ['/usr/include/ffi', - '/usr/include/libffi'] # may be changed by pkg-config -+include_dirs = os.environ['FFI_INC'].split(",") if 'FFI_INC' in os.environ else [] - define_macros = [] ++include_dirs = os.environ['FFI_INC'].split(',') if 'FFI_INC' in os.environ else [] + define_macros = [('FFI_BUILDING', '1')] # for linking with libffi static library library_dirs = [] extra_compile_args = [] -@@ -67,14 +66,7 @@ def ask_supports_thread(): - sys.stderr.write("The above error message can be safely ignored\n") +@@ -105,14 +104,7 @@ def uses_msvc(): + return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif') def use_pkg_config(): - if sys.platform == 'darwin' and os.path.exists('/usr/local/bin/brew'): @@ -25,6 +25,4 @@ index c1db368..57311c3 100644 - _ask_pkg_config(extra_link_args, '--libs-only-other') - _ask_pkg_config(libraries, '--libs-only-l', '-l') + pass - - def use_homebrew_for_libffi(): - # We can build by setting: +