Python extensions: Please tell me there's an easier way!

Dear Lazyweb,

Please tell me there’s an easier way of building Python C/C++ extensions (read shared objects) using automake than by using libtool. Please! Please!

I just want a frickin’ .so file, nothing complicated. Is the only way, besides using libtool, to write custom targets?

⟸ Python coding dojo in Cambridge Another way to start Xmonad in Gnome ⟹

Magnus

@C Smith: Huh? Since I’m already using Boost.Python for my Python extension I know for a fact that it is no replacement for automake ;-)

Anonymous

I’ve always used GNU make to coordinate the building of python extensions.

Magnus

@Anonymous, using GNU make isn’t a net gain in this case, there are a lot of things that come for free when using the AutoTools.

@lilac, distutils would indeed be the right answer if I was building a Python “module”. What I didn’t mention is that the extension is part of a Gnome application written in Python. distutils is not the way to go for that.

??

i hope i will never use python, i haven’t mastered c and c++. :)

Magnus

@??: I’m not sure anyone’s mastered C++ but I’m sure that anyone who does will find it isn’t worth the effort ;-) So after you’re done with C I’d move on to a higher-level language, Python, Haskell, anything that tickles your fancy.

Leave a comment