Skip to content

Cffi update #2800

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: