Skip to content

Commit

Permalink
Update cffi recipe for Python 3.10 (kivy#2800)
Browse files Browse the repository at this point in the history
* Update __init__.py

version bump to 1.15.1

* Update disable-pkg-config.patch

adjust patch for 1.15.1
  • Loading branch information
HyTurtle authored and SomberNight committed Apr 18, 2024
1 parent 04e8008 commit 5df11be
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/cffi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
20 changes: 9 additions & 11 deletions pythonforandroid/recipes/cffi/disable-pkg-config.patch
Original file line number Diff line number Diff line change
@@ -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'):
Expand All @@ -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:

0 comments on commit 5df11be

Please sign in to comment.