[PyKDE] how about distutils setup script ?

Gerard Vermeulen gvermeul at labs.polycnrs-gre.fr
Fri Jun 22 09:12:35 BST 2001


On Thursday 21 June 2001 23:39, Thomas Malik wrote:

> > I've done this sort of thing for pyqt and pykde. To be honest, i don't 
like
> the autoconf/libtool stuff altogether (works very badly for me, in our
> quite non-standard environment with multiple python/qt/kde/gcc versions,
> especially the runtime library paths never work as-is on solaris).
>
> So, it's nothing more than a ~100-liner setup script for distutils (which
> comes packaged with python2.1, available for 1.5.2 also), which should work
> on any platform, and can do stuff like compiling, directly build
> rpm-packages (and sun solaris packages, with my own extensions), use a
> configuration file (where you can enter the paths to your qt/kde
> installation). With this thing, building is really easy, also with any
> version of python and qt. Should even work on Win32 (untested). It does
> also rebuild the sources (omitting the Makefiles, however ...). Anyone
> interested  ? Phil ?
>
Please, post it.

IMHO libtool is not ready for use with C++. I started to build my own 
interfaces to C++ with a very simple setup.py script, something like this:

#!/usr/bin/env python

from distutils.core import setup, Extension

# add stdc++ as library is good enough for gcc
ext_modules = [
    Extension('alambic',
              ['alambicmodule.cpp'],
              include_dirs = [ '../hardware', '../tools', '../toy' ],
              library_dirs = [ '../tools', '../toy'],
              libraries = [ 'fftw', 'tools', 'toy', 'stdc++' ],
              extra_compile_args = [ '-fno-exceptions' ])
    ]

setup(
    name = "alambic",
    version = "0.0.4",
    description = "Python interface to the Alambic data files",
    ext_modules = ext_modules
    )


Gerard
-- 
Gerard Vermeulen -- CRTBT -- BP 166 -- 38042 Grenoble Cedex 9 -- France
TEL: 33 (0)4 76 88 12 53 or 33 (0)4 76 88 12 61
FAX: 33 (0)4 76 87 50 60
http://www-crtbt.polycnrs-gre.fr/he3pol




More information about the PyQt mailing list