[Distutils] distutils extension and setuptools
Samuel.Dufour at sophia.inria.fr
Tue Nov 28 13:29:17 CET 2006
We currently develop a software to integrate packages (C++/Python) in
plant modeling. We use SCons to build C++ library and Boost.Python to
create the wrappers. We have extended distutils to call scons rather
than distutils.build_ext. Thus, we distribute packages with the
distutils frontend (sdist, bdist_*).
All python modules are installed in a common namespace (a meta-package).
All libraries and data (shared libraries, headers, tests,...) are
installed in a common directory on the system which is
external to the python installation (e.g. /usr/local).
We would like to use setuptools functionalities to manage dependencies
between packages. Is it possible to extend setuptools as we extend
distutils to deals correctly with external data ?
Our own distutils extension (OpenAlea.DistX) provides the following
- build_scons : call scons with subprocess during the build process.
- build_namespace : create meta packages (just a directory and a
- install_external_data : copy some data in a custom place. We adapt
sdist and bdist_* commands to manage this kind of data. It is like the
'data_file' field, but add recursive copy and the detection of base
destination directory depending of the system configuration.
- set_env_var : set windows environment variable to discover shared
libs at runtime.
OpenAlea.DistX is available on
More information about the Distutils-SIG