- Feb 26, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
- Feb 25, 2019
-
-
Armin Rigo authored
-
- Feb 22, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
More rewording
-
- Feb 21, 2019
-
-
Armin Rigo authored
Fix bug in documentation
-
- Feb 16, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
Armin Rigo authored
-
- Feb 14, 2019
-
-
Armin Rigo authored
-
- Feb 13, 2019
-
-
Armin Rigo authored
-
Armin Rigo authored
-
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`.
-