<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/cffi.git/cffi/api.py, branch py.code</title>
<subtitle>foss.heptapod.net: pypy/cffi
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/'/>
<entry>
<title>Issue #437</title>
<updated>2020-01-05T12:46:20+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2020-01-05T12:46:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=263cff26c5edcb9e77990078faec25431303c107'/>
<id>263cff26c5edcb9e77990078faec25431303c107</id>
<content type='text'>
Support ffi.dlopen(&lt;void* cdata&gt;).  See updated documentation.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support ffi.dlopen(&lt;void* cdata&gt;).  See updated documentation.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport 4d18a461a973 from pypy</title>
<updated>2019-01-31T21:49:45+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2019-01-31T21:49:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=bd9ae66c6172d9ceb4730ce6d0c275e29f2e3070'/>
<id>bd9ae66c6172d9ceb4730ce6d0c275e29f2e3070</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Change the API and document it.</title>
<updated>2019-01-31T11:44:18+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2019-01-31T11:44:18+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=e5e4c8b8938e6651c93db8fd776ee08d93da732e'/>
<id>e5e4c8b8938e6651c93db8fd776ee08d93da732e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Tweaks to the pkgconfig support</title>
<updated>2019-01-31T11:14:50+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2019-01-31T11:14:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=acfd2aef58cd40f4ee06bcc551b8549bb16974e8'/>
<id>acfd2aef58cd40f4ee06bcc551b8549bb16974e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Exception based flow</title>
<updated>2019-01-09T07:39:32+00:00</updated>
<author>
<name>Michal Vyskocil</name>
<email>michal.vyskocil@gmail.com</email>
</author>
<published>2019-01-09T07:39:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=a8b836b1f1c2b6505636a2e136894528eab04dc5'/>
<id>a8b836b1f1c2b6505636a2e136894528eab04dc5</id>
<content type='text'>
Now the with non pkg-config backup would be
```
module_name = "_czmq"
source = "#include &lt;czmq.h&gt;"
try:
    print(f"### pkg-config path")
    ffibuilder.set_source(
        module_name,
        source,
        pkgconfig=["libczmq"]
    )
except Exception as e:
    print(f"Exception e: {e}")
    ffibuilder.set_source(
        module_name,
        source,
        libraries=["czmq"]
    )
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now the with non pkg-config backup would be
```
module_name = "_czmq"
source = "#include &lt;czmq.h&gt;"
try:
    print(f"### pkg-config path")
    ffibuilder.set_source(
        module_name,
        source,
        pkgconfig=["libczmq"]
    )
except Exception as e:
    print(f"Exception e: {e}")
    ffibuilder.set_source(
        module_name,
        source,
        libraries=["czmq"]
    )
```
</pre>
</div>
</content>
</entry>
<entry>
<title>Real test of a pkgconfig integration</title>
<updated>2019-01-08T10:08:02+00:00</updated>
<author>
<name>Michal Vyskocil</name>
<email>michal.vyskocil@gmail.com</email>
</author>
<published>2019-01-08T10:08:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=3ea5d9a89d5288047026ebbb10c5b7f938ca2caf'/>
<id>3ea5d9a89d5288047026ebbb10c5b7f938ca2caf</id>
<content type='text'>
Fix encoding errors

Given testing Python program
```
from cffi import FFI
ffibuilder = FFI()

ffibuilder.cdef(
    "char* zsys_hostname();"
)

ffibuilder.set_source(
    "_czmq",
    "#include &lt;czmq.h&gt;",
    pkgconfig=["libczmq"]
)


if __name__ == "__main__":
    ffibuilder.compile(verbose=True)
```

We can run ffibuilder from source dir of czmq

```
PKG_CONFIG_PATH=`pwd`/src python3 t.py
generating ./_czmq.c
...
gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none ./_czmq.o -L/usr/local/lib64 -L/usr/lib64 -lczmq -lzmq -lpython3.6m -o ./_czmq.cpython-36m-x86_64-linux-gnu.so
```

```
python3 t.py
generating ./_czmq.c
...
gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none ./_czmq.o -L/usr/lib64 -lczmq -lpython3.6m -o ./_czmq.cpython-36m-x86_64-linux-gnu.so
```

Note that in the first case `/usr/local` has been added to the compiler path as
provided by local pkg-config file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix encoding errors

Given testing Python program
```
from cffi import FFI
ffibuilder = FFI()

ffibuilder.cdef(
    "char* zsys_hostname();"
)

ffibuilder.set_source(
    "_czmq",
    "#include &lt;czmq.h&gt;",
    pkgconfig=["libczmq"]
)


if __name__ == "__main__":
    ffibuilder.compile(verbose=True)
```

We can run ffibuilder from source dir of czmq

```
PKG_CONFIG_PATH=`pwd`/src python3 t.py
generating ./_czmq.c
...
gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none ./_czmq.o -L/usr/local/lib64 -L/usr/lib64 -lczmq -lzmq -lpython3.6m -o ./_czmq.cpython-36m-x86_64-linux-gnu.so
```

```
python3 t.py
generating ./_czmq.c
...
gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none ./_czmq.o -L/usr/lib64 -lczmq -lpython3.6m -o ./_czmq.cpython-36m-x86_64-linux-gnu.so
```

Note that in the first case `/usr/local` has been added to the compiler path as
provided by local pkg-config file.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge with latest tip</title>
<updated>2019-01-08T09:29:51+00:00</updated>
<author>
<name>Michal Vyskocil</name>
<email>michal.vyskocil@gmail.com</email>
</author>
<published>2019-01-08T09:29:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=2793a648435f6dd867b9462daa865b3790492305'/>
<id>2793a648435f6dd867b9462daa865b3790492305</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Increase testing coverage and refactor method names</title>
<updated>2019-01-08T07:32:16+00:00</updated>
<author>
<name>Michal Vyskocil</name>
<email>michal.vyskocil@gmail.com</email>
</author>
<published>2019-01-08T07:32:16+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=a074df4d40f178c21249bc3f0791082f6230499f'/>
<id>a074df4d40f178c21249bc3f0791082f6230499f</id>
<content type='text'>
Making `pkgconfig.call` function accessible, tests can monkey patch it and
provide mock. This improves testing, however raised a need to give
functions better names than `pkgconfig.pkgconfig_kwargs` or `pkgconfig.pc`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Making `pkgconfig.call` function accessible, tests can monkey patch it and
provide mock. This improves testing, however raised a need to give
functions better names than `pkgconfig.pkgconfig_kwargs` or `pkgconfig.pc`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement ffi.from_buffer("foo[]", x)</title>
<updated>2019-01-07T22:23:58+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2019-01-07T22:23:58+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=992922b58e02ebf0a58eb6232112da8c6fe2fdcc'/>
<id>992922b58e02ebf0a58eb6232112da8c6fe2fdcc</id>
<content type='text'>
Also contains some improvements to the documentation about other recent
additions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also contains some improvements to the documentation about other recent
additions
</pre>
</div>
</content>
</entry>
<entry>
<title>ffi.release()</title>
<updated>2019-01-05T10:07:31+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2019-01-05T10:07:31+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-packages/cffi.git/commit/?id=dbdef41518d844776f05adb3dfd18d589d68b704'/>
<id>dbdef41518d844776f05adb3dfd18d589d68b704</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
