[Scons-users] SWIG

Paweł Tomulik ptomulik at meil.pw.edu.pl
Wed Mar 11 10:38:16 EDT 2015


W dniu 11.03.2015 o 02:03, William Roberts pisze:
> So I have a heiarchical biuld going on, my SConstruct defines this
> method that is exported to my SConscripts
> 
> def buildSharedLibrary(*args, **kwargs):
>         l = env.SharedLibrary(*args, **kwargs)
>         x = env.Install(libdir, l)
>         return [l, x]
> 
> So all my shared libraries end up in out/lib
> 
> I am currently trying to make a swig wrapper, and my SConstruct defines:
> 
> buildSharedLibrary('_miniat.so', 'src/miniat.i', LIBS=['miniat'],
> CPPPATH=[ INC, distutils.sysconfig.get_python_inc() ], SHLIBPREFIX="",
> SWIGFLAGS=['-python'])
> 
> Which builds the wrapper into a shared object just fine. However, swig
> outputs a generated python file at:
> ./out/vm/src/miniat.py
> 
> What I am trying to do, is get SCons to install this into the
> SharedLibrary directory, but it doesn't seem to be ommited here:
> l = env.SharedLibrary(*args, **kwargs)
> 
> How can I get that generated file output where I want it?
> 
> 
> -- 
> Respectfully,
> 
> William C Roberts

William,

you may take a look here: https://github.com/ptomulik/scons-tool-swigpy

it may simplify your task of swig-python module generation. Let me know.

Regards,


-- 
Paweł Tomulik, tel. (22) 234 7925
Instytut Techniki Lotniczej i Mechaniki Stosowanej
Politechnika Warszawska


More information about the Scons-users mailing list