- Feb 13, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
- Jan 31, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
Passing of proper CFLAGS/CXXFLAGS/LDFLAGS is hard and error prone
-
- Jan 11, 2019
-
-
Michal Vyskocil authored
-
- Jan 10, 2019
-
-
Michal Vyskocil authored
S: can't use u prefixes, as it is syntax error there
-
Michal Vyskocil authored
* 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 ```
-
- Jan 09, 2019
-
-
Michal Vyskocil authored
-
Michal Vyskocil authored
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"] ) ```
-
- Jan 08, 2019
-
-
Michal Vyskocil authored
-
Michal Vyskocil authored
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.
-
Michal Vyskocil authored
-
Michal Vyskocil authored
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`.
-
- May 25, 2017
-
-
Michal Vyskocil authored
use bytes instead of strings
-
Michal Vyskocil authored
-
Michal Vyskocil authored
-
Michal Vyskocil authored
read extra_compile_args and extra_link_args fom pkg-config too
-
Michal Vyskocil authored
-
- May 22, 2017
-
-
Michal Vyskocil authored
Add pkg-config wrapper, which is the cross-platform tool telling exactly this.
-
- Jan 30, 2019
-
-
Armin Rigo authored
-
- Jan 28, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
On Windows, there is no lround() or (as far as I can find) any math function returning an integer.
-
Armin Rigo authored
-
Armin Rigo authored
Add "thread canary" objects which are deallocated if the PyThreadState is explicitly deallocated by CPython. If the thread shuts down first, then instead the canary is inserted in a zombie list. In that case, we clear and delete properly the PyThreadState at the next occasion.
-
- Jan 27, 2019
-
-
Armin Rigo authored
-
- Jan 08, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
- Jan 07, 2019
-
-
Armin Rigo authored
Also contains some improvements to the documentation about other recent additions
-
- Jan 05, 2019
-
-
Armin Rigo authored
-
- Dec 25, 2018
-
-
Armin Rigo authored
Workaround for a pycparser issue.
-
- Dec 18, 2018
-
-
Armin Rigo authored
-