summaryrefslogtreecommitdiff
path: root/cffi
Commit message (Collapse)AuthorAgeFilesLines
* Windows fixArmin Rigo2019-04-191-1/+2
|
* bump version to 1.12.3Armin Rigo2019-04-112-3/+3
|
* remove extra comments.guillaumesottas2019-03-261-5/+3
|
* remove useless try/catch, and remove unreachable elif statement.guillaumesottas2019-03-261-2/+0
|
* add support for long/long long C integer constant suffixes, and supportguillaumesottas2019-03-261-6/+16
| | | | for base 2 integer constant as well.
* fix #407 add support for u/U suffix in integer constants (eg. 0xABu, or 0xCDU).guillaumesottas2019-03-251-0/+2
|
* py3.8 fixesArmin Rigo2019-03-161-6/+39
|
* bump version number to 1.12.2Armin Rigo2019-02-262-3/+3
|
* bump version number to 1.12.1Armin Rigo2019-02-162-3/+3
|
* On Windows, we still can't use Py_LIMITED_API for bad reasons.Armin Rigo2019-02-162-36/+19
|
* Backport 4d18a461a973 from pypyArmin Rigo2019-01-311-1/+1
|
* Change the API and document it.Armin Rigo2019-01-311-6/+10
|
* Tweaks to the pkgconfig supportArmin Rigo2019-01-314-64/+84
|
* Reduce number of exceptionsMichal Vyskocil2019-01-112-16/+6
|
* P: cffi must be compatible with 3.2Michal Vyskocil2019-01-101-5/+5
| | | | S: can't use u prefixes, as it is syntax error there
* Define and raise specific hierarchy of exceptionsMichal Vyskocil2019-01-102-4/+41
| | | | | | | | | | | | | | | | | | | | | | | * PkgConfigNotFound - not installed * PkgConfigError - base pkg-config errors * PkgConfigModuleNotFound - pc file for module was not found * PkgConfigModuleVersionNotFound - requested version was not found Boilerplate now looks ``` from cffi.error import PkgConfigNotFound, PkgConfigError ... try: # try pkg-config way ffibuilder.set_source(..., pkgconfig=["libczmq >= 4.0.0"]) except PkgConfigNotFound as e: # if pkg-config is not installed, try backup ffibuilder.set_source(..., libraries=["czmq", "zmq", "uuid", "pgm"]) except PkgConfigError as e: # here we catch both PkgConfigModuleNotFound and PkgConfigModuleVersionNotFound # and raise it again - simply to show they are raised raise e from None ```
* Document version pinning for pkgconfigMichal Vyskocil2019-01-091-1/+1
|
* Exception based flowMichal Vyskocil2019-01-092-17/+11
| | | | | | | | | | | | | | | | | | | | | | Now the with non pkg-config backup would be ``` module_name = "_czmq" source = "#include <czmq.h>" 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"] ) ```
* fix encoding of `--libs-only-l` it's about file system namesMichal Vyskocil2019-01-081-1/+1
|
* Real test of a pkgconfig integrationMichal Vyskocil2019-01-082-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix encoding errors Given testing Python program ``` from cffi import FFI ffibuilder = FFI() ffibuilder.cdef( "char* zsys_hostname();" ) ffibuilder.set_source( "_czmq", "#include <czmq.h>", 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.
* merge with latest tipMichal Vyskocil2019-01-082-0/+93
|\
| * Increase testing coverage and refactor method namesMichal Vyskocil2019-01-082-57/+59
| | | | | | | | | | | | 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`.
| * code not compatible with python3Michal Vyskocil2017-05-251-1/+1
| | | | | | | | use bytes instead of strings
| * drop debug printMichal Vyskocil2017-05-251-1/+0
| |
| * can't link with libraries expects -pthreads or similar flagsMichal Vyskocil2017-05-251-1/+6
| | | | | | | | read extra_compile_args and extra_link_args fom pkg-config too
| * Improve documentation of pkgconfig_kwargsMichal Vyskocil2017-05-251-3/+12
| |
| * Passing of proper CFLAGS/CXXFLAGS/LDFLAGS is hard and error proneMichal Vyskocil2017-05-222-0/+78
| | | | | | | | Add pkg-config wrapper, which is the cross-platform tool telling exactly this.
* | Implement ffi.from_buffer("foo[]", x)Armin Rigo2019-01-071-3/+12
| | | | | | | | | | Also contains some improvements to the documentation about other recent additions
* | ffi.release()Armin Rigo2019-01-051-0/+3
| |
* | Issue #392Armin Rigo2018-12-251-0/+7
| | | | | | | | Workaround for a pycparser issue.
* | Issue #394Armin Rigo2018-12-161-2/+3
| | | | | | | | Implement ffi.from_buffer(x, require_writable=True)
* | Merged in rlamy/cffi (pull request #94)Armin Rigo2018-11-291-24/+0
|\ \ | | | | | | | | | Move test-only function from cffi/ to testing/
| * | Move test-only function from cffi/ to testing/Ronan Lamy2018-11-271-24/+0
| | |
* | | Silence bogus warningArmin Rigo2018-11-271-1/+3
|/ /
* | #389Armin Rigo2018-10-111-0/+9
| | | | | | | | Warn when using string literals in the cdef() source
* | "python setup.py sdist" should not list the generated ABI module.Armin Rigo2018-09-091-0/+12
| | | | | | | | | | See ``"python3 setup.py sdist" wrongly packages auto-generated file (out-of-line ABI-mode)`` on the mailing list.
* | Issue #379Armin Rigo2018-08-301-0/+4
| | | | | | | | Accept ``ffi.new("int[4]", p)`` if p is itself another cdata ``int[4]``.
* | Redo 164e526a5515 and 14ce6985e1c3.Armin Rigo2018-08-241-3/+36
| |
* | setuptools_ext.py edited online with BitbucketOfek Lev2018-08-191-6/+1
| |
* | [windows] Support Py_LIMITED_APIOfek Lev2018-08-191-10/+0
| |
* | Issue #373Armin Rigo2018-08-011-1/+3
| | | | | | | | Fix?
* | Bump version to 1.12.0 (but not planning a release soon)Armin Rigo2018-07-072-3/+3
| |
* | Issue 364Armin Rigo2018-06-165-11/+40
| | | | | | | | Add support for MSVC's "#pragma pack(n)" in ABI mode
* | Bump to 1.11.5Armin Rigo2018-02-272-3/+3
| |
* | Import from setuptools instead of distutils from hereArmin Rigo2018-02-231-2/+2
| | | | | | | | (see issue #345)
* | Issue #358Armin Rigo2018-02-221-60/+8
| | | | | | | | Fix following recent changes to CPython 2.7
* | Implement ffi.dlclose() for the in-line caseArmin Rigo2018-02-161-0/+10
| |
* | More comments for e59662b013b4Armin Rigo2018-02-111-0/+7
| |
* | In ABI mode, add the python file into the dist.py_modules list.Armin Rigo2018-02-111-0/+4
| | | | | | | | | | Usually makes no difference, except if you use "install --record=xx --root=yy".
* | Issue #357: fix the out-of-line ABI mode when we see structsArmin Rigo2018-01-312-11/+15
| | | | | | | | containing anonymous unions or vice-versa