[PyQt] Includes in wrapper library

Phil Thompson phil at riverbankcomputing.com
Mon Nov 21 14:48:24 GMT 2016


On 21 Nov 2016, at 1:41 pm, Jay L. <jlaura at asu.edu> wrote:
> 
> This question is about includes in the target C++ library.  The target library has a number of 3rd party dependencies (Boost for example) that are included in the CPP headers.  Right now, I have a Makefile that manually edit in configure.py to patch in the wrapped library's includes:
> 
>     extra_cxxflags = ["$(ALLINCDIRS)"]
>     extra_libs = ["$(ALLLIBS)", "-Wl,-rpath," + root + "/lib", "-Wl,-rpath,"+ root +"/3rdParty/lib"]
>     extra_lib_dirs = ["$(ALLLIBDIRS)"]
> 
>     makefile = ModuleMakefile(configuration=config, build_file=build_file, installs=installs)
>     makefile.extra_cxxflags = extra_cxxflags
>     makefile.extra_lflags = extra_lib_dirs
>     makefile.generate()
> 
> This is working fine via configure.py, but I would love to be able to use setuptools/distutils and have a standard, pip installable package.
> 
> 1) I want to confirm that any 3rd party libraries included in the code I am trying to wrap must be linked when building the bindings?

Only if you are explicitly calling those libraries from your code.

> 2) The ALLINCDIRS environment variable is coming from the wrapped library's build system.  Is anyone aware of a method to get this variable outside of make? (I doubt this is possible, as the variable is not even populated until make is invoked, but perhaps it is...)

Phil



More information about the PyQt mailing list