Foreign Function Interface for Python calling C code. The aim of this project
is to provide a convenient and reliable way of calling C code from Python.
Provides
Requires
License
MIT
Changelog
* Sun Sep 14 2025 Dirk Müller <dmueller@suse.com>
- update to 2.0.0:
* Added support for free threaded CPython (3.14t+ only)
* Added support for Python 3.14.
* Dropped support for Python 3.8.
* Wed Oct 09 2024 Dirk Müller <dmueller@suse.com>
- update to 1.17.1:
* Fix failing distutils.msvc9compiler imports under Windows (#118).
* ffibuilder.emit_python_code() and ffibuiler.emit_c_code()
accept file-like objects (#115).
* ffiplatform calls are bypassed by ffibuilder.emit_python_code()
and ffibuilder.emit_c_code() (#81).
* Sat Aug 31 2024 Dirk Müller <dmueller@suse.com>
- update to 1.17.0:
* Add support for Python 3.13.
* In API mode, when you get a function from a C library by writing
`fn = lib.myfunc`, you get an object of a special type for
performance reasons, instead of a `<cdata 'C-function-type'>`.
Before version 1.17 you could only call such objects.
You could write `ffi.addressof(lib, "myfunc")` in order to get
a real `<cdata>` object, based on the idea that in these cases
in C you'd usually write `&myfunc` instead of `myfunc`. In
version 1.17, the special object `lib.myfunc` can now be passed
in many places where CFFI expects
a regular `<cdata>` object. For example, you can now pass
it as a callback to a C function call, or write it inside a C
structure field of the correct pointer-to-function type, or use
`ffi.cast()` or `ffi.typeof()` on it.
- drop py313-compat.patch, py313-use-format-unraisable.patch,
py313-use-hashpointer.patch (upstream)
* Sun Jun 30 2024 Dirk Müller <dmueller@suse.com>
- add py313-compat.patch
py313-use-format-unraisable.patch
py313-use-hashpointer.patch: add upstream patches for py3.13
support
* Thu Feb 29 2024 Dan Čermák <dcermak@suse.com>
- drop unnecessary buildrequire python-py
* Fri Oct 06 2023 Matej Cepl <mcepl@cepl.eu>
- Upgrade to 1.16.0:
- Add support for Python 3.12. With the removal of distutils
from Python 3.12, projects using CFFI features that depend on
distutils at runtime must add a dependency on setuptools to
function under Python 3.12+. CFFI does not declare a runtime
setuptools requirement to avoid an unnecessary dependency for
projects that do not require it.
- Drop support for end-of-life Python versions (2.7, 3.6, 3.7).
- Move project source under src/; a more standard layout that
also enables CI to more easily catch packaging errors.
- Move project home to python-cffi/cffi on GitHub.
- Add support for PEP517 builds; setuptools is now a required
build dependency.
- Declare python_requires metadata for Python 3.8+. This allows
unsupported Pythons to continue using previously released
sdists and wheels.
- Add missing calls to PyObject_GC_UnTrack to avoid
ResourceWarning 15c4b71
- Remove upstreamed patch
8a3c2c816d789639b49d3ae867213393ed7abdff.patch
* Fri Oct 06 2023 Matej Cepl <mcepl@cepl.eu>
- Clean up the SPEC file
* Fri Apr 21 2023 Dirk Müller <dmueller@suse.com>
- add sle15_python_module_pythons (jsc#PED-68)
* Thu Apr 13 2023 Matej Cepl <mcepl@suse.com>
- Make calling of %{sle15modernpython} optional.
* Fri Jan 06 2023 Dirk Müller <dmueller@suse.com>
- add 8a3c2c816d789639b49d3ae867213393ed7abdff.patch to resolve
testsuite failures with Python 3.11
* Mon Dec 05 2022 Daniel Garcia <daniel.garcia@suse.com>
- Add python-py as test dependency
* Tue Jul 19 2022 Dirk Müller <dmueller@suse.com>
- update to 1.15.1:
* If you call ffi.embedding_api() but don’t write any extern “Python” function
there, then the resulting C code would fail an assert. Fixed.
* Updated Windows/arm64 embedded libffi static lib to v3.4.2, and scripted to
ease future updates (thanks Niyas Sait!)
Files
/usr/lib/python3.12/site-packages/_cffi_backend.cpython-312-arm-linux-gnueabihf.so
/usr/lib/python3.12/site-packages/cffi
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/INSTALLER
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/METADATA
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/RECORD
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/REQUESTED
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/WHEEL
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/entry_points.txt
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/licenses
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/licenses/AUTHORS
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/licenses/LICENSE
/usr/lib/python3.12/site-packages/cffi-2.0.0.dist-info/top_level.txt
/usr/lib/python3.12/site-packages/cffi/__init__.py
/usr/lib/python3.12/site-packages/cffi/__pycache__
/usr/lib/python3.12/site-packages/cffi/__pycache__/__init__.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/__init__.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/_imp_emulation.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/_imp_emulation.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/_shimmed_dist_utils.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/_shimmed_dist_utils.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/api.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/api.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/backend_ctypes.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/backend_ctypes.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/cffi_opcode.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/cffi_opcode.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/commontypes.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/commontypes.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/cparser.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/cparser.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/error.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/error.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/ffiplatform.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/ffiplatform.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/lock.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/lock.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/model.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/model.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/pkgconfig.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/pkgconfig.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/recompiler.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/recompiler.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/setuptools_ext.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/setuptools_ext.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/vengine_cpy.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/vengine_cpy.cpython-312.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/vengine_gen.cpython-312.opt-1.pyc
/usr/lib/python3.12/site-packages/cffi/__pycache__/vengine_gen.cpython-312.pyc
/usr