./devel/py-cffi, Foreign Function Interface for Python calling C code

[ CVSweb ] [ Homepage ] [ RSS ] [ Required by ] [ Add to tracker ]


Branch: CURRENT, Version: 1.14.2, Package name: py37-cffi-1.14.2, Maintainer: pkgsrc-users

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. The interface is based on LuaJIT's FFI and
follows a few principles:

o The goal is to call C code from Python. You should be able to do
so without learning a 3rd language: every alternative requires
you to learn their own language (Cython, SWIG) or API (ctypes).
So we tried to assume that you know Python and C and minimize
the extra bits of API that you need to learn.
o Keep all the Python-related logic in Python so that you don't
need to write much C code.
o Work either at the level of the ABI (Application Binary Interface)
or the API (Application Programming Interface). Usually, C
libraries have a specified C API but often not an ABI.
o We try to be complete. For now some C99 constructs are not
supported, but all C89 should be, including macros.
o We attempt to support both PyPy and CPython, with a reasonable
path for other Python implementations like IronPython and Jython.
o Note that this project is not about embedding executable C code
in Python, unlike Weave. This is about calling existing C libraries
from Python.


Required to run:
[devel/py-setuptools] [devel/libffi] [devel/py-cparser] [lang/python37]

Required to build:
[pkgtools/cwrappers]

Master sites:

SHA1: 6d2f277d1f1e3d9a09fc5df4bfcea63229e8e8d1
RMD160: e6ed5c4f230f18353bf17ad70fc0fd023b3941c6
Filesize: 459.704 KB

Version history: (Expand)


CVS history: (Expand)


   2020-08-24 13:08:14 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-cffi: updated to 1.14.2

v1.14.2
=======

* CPython 3 on Windows: we again try to compile with ``Py_LIMITED_API``
  by default.  This flag is not added if you run the compilation with
  CPython 3.4, as it only works with CPython >= 3.5, but by now this
  version of Python is quite old (and we no longer distribute cffi
  wheels for it).

  This may require that you upgrade ``virtualenv`` (requires version 16
  or newer) or at least copy manually ``python3.dll`` into your existing
  virtualenvs.  For distributing wheels with your cffi modules, you may
  also need to upgrade ``wheel`` to the just-released version 0.35.

  You can manually disable ``Py_LIMITED_API`` by calling
  ``ffi.set_source(..., py_limited_api=False)``.
   2020-07-27 19:28:05 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-cffi: updated to 1.14.1

v1.14.1
=======

* CFFI source code is now `hosted on Heptapod`_.

* Improved support for ``typedef int my_array_t[...];`` with an explicit
  dot-dot-dot in API mode

* Windows (32 and 64 bits): multiple fixes for ABI-mode call to functions
  that return a structure.

* Experimental support for MacOS 11 on aarch64.

* and a few other minor changes and bug fixes.
   2020-05-16 11:09:05 by Adam Ciarcinski | Files touched by this commit (5)
Log message:
pytest from versioned depends
   2020-03-08 17:42:31 by Benny Siegert | Files touched by this commit (67)
Log message:
Revbump packages depending on libffi after .so version change.

Requested by Matthias Ferdinand and Oskar on pkgsrc-users.
   2020-03-04 19:27:28 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-cffi: updated to 1.14.0

v1.14

ffi.dlopen() can now be called with a handle (as a void *) to an already-opened \ 
C library.
CPython only: fixed a stack overflow issue for calls like lib.myfunc([large \ 
list]). If the function is declared as taking a float * argument, for example, \ 
then the array is temporarily converted into a C array of floats—however, the \ 
code used to use alloca() for this temporary storage, no matter how large. This \ 
is now fixed.

The fix concerns all modes: in-line/out-of-line API/ABI. Also note that your \ 
API-mode C extension modules need to be regenerated with cffi 1.14 in order to \ 
get the fix; i.e. for API mode, the fix is in the generated C sources. (The C \ 
sources generated from cffi 1.14 should also work when running in a different \ 
environment in which we have an older version of cffi. Also, this change makes \ 
no difference on PyPy.)

As a workaround that works on all versions of cffi, you can write \ 
lib.myfunc(ffi.new("float[]", [large list])), which is equivalent but \ 
explicity builds the intermediate array as a regular Python object on the heap.
fixed a memory leak inside ffi.getwinerror() on CPython 3.x.
   2019-11-06 18:24:50 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-cffi: updated to 1.13.2

v1.13.2
* re-release because the Linux wheels came with an attached version of libffi
  that was very old and buggy
   2019-10-25 12:21:35 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-cffi: updated to 1.13.1

v1.13.1
* deprecate the way to declare in cdef() a global variable with only void *foo;. \ 
You should always use a storage class, like extern void *foo; or maybe static \ 
void *foo;. These are all equivalent for the purposes of cdef(), but the reason \ 
for deprecating the bare version is that (as far as I know) it would always be \ 
mistake in a real C header.
* fix the regression RuntimeError: found a situation in which we try to build a \ 
type recursively.
* fixed issue 427 where a multithreading mistake in the embedding logic \ 
initialization code would cause deadlocks on CPython 3.7.
   2019-10-16 10:12:08 by Adam Ciarcinski | Files touched by this commit (2) | Package updated
Log message:
py-cffi: updated to 1.13.0

v1.13
* ffi.from_buffer("type *", ..) is now supported, in addition to
  "type[]".  You can then write p.field to access the items, instead
  of only p[0].field.  Be careful that no bounds checking is performed, so
  p[n] might access data out of bounds.
* fix for structs containing unnamed bitfields like int : 1;.
* when calling cdata of "function pointer" type, give a RuntimeError \ 
instead
  of a crash if the pointer happens to be NULL
* support some more binary operations between constants in enum definitions
* silence a warning incorrectly emitted if you use a quote in a preprocessor
  line
* detect a corner case that would throw the C code into an infinite
  recursion, with ffi.cdef("""struct X { void(*fnptr)(struct X); \ 
};""")