[Distutils] c extensions: how to rebuild and test quickly

John Machin sjmachin at lexicon.net
Thu Feb 15 00:47:30 CET 2007


On 15/02/2007 10:30 AM, Paul Pogonyshev wrote:
> Hi,
> 
> Distutils create dynamic library for a C extension in `build/...'
> directory.  This makes it impossible to run program without
> installing it,

Could you not put the build directory on your PYTHONPATH?
Possible, if inconvenient.

> which I find very important for developing.  Ideally,
> process should look like this:
>     edit Python code -> test (uninstalled);
> or
>     edit C code -> ./setup.by build -> test (uninstalled).
> This is all possible if I create a symbolic link from build
> directory to the sources.  Then extension module can be imported
> normally and everything is like it was with all code limited to
> Python.
> 
> Is it possible in some standard (and preferably portable) way with
> distutils?  Is it already done?
> 
Is
....setup.py build_ext --inplace
what you are looking for?

Don't forget
....setup.py --help build_ext

HTH,
John


More information about the Distutils-SIG mailing list