distutils.Extension : setting a concurrency level

Hi, I'm wondering how to reproduce the equivalent of "make -j<n>" on a setup.py script. In my setup, I'm using distutils.Extension to build a C(++, somehow) extension to Python 2.6. I have a few dozens files in the "sources" parameter of the Extension module and I would like to get a chance to use my multi-core CPU to speed up my extension's build. My desired outcome: having setup.py build using a few instances of my C-compiler in the same time, instead of only one. There are probably an environnement var or two that I'm missing. Or maybe it could be an interesting feature for distutils2 ? Thank you for your help. -- Florian Le Goff Lille, France

On Fri, Jul 23, 2010 at 2:46 PM, Florian Le Goff <bletofarine@gmail.com> wrote:
Hi,
I'm wondering how to reproduce the equivalent of "make -j<n>" on a setup.py script.
In my setup, I'm using distutils.Extension to build a C(++, somehow) extension to Python 2.6. I have a few dozens files in the "sources" parameter of the Extension module and I would like to get a chance to use my multi-core CPU to speed up my extension's build.
My desired outcome: having setup.py build using a few instances of my C-compiler in the same time, instead of only one.
There are probably an environnement var or two that I'm missing. Or maybe it could be an interesting feature for distutils2 ?
This is not possible in Distutils, and I know that Martin wanted such a feature, ccing him, not sure if he did something. In any case, building extensions in parallel would definitely be an improvement and a patch for distutils2 is welcome Regards Tarek -- Tarek Ziadé | http://ziade.org
participants (2)
-
Florian Le Goff
-
Tarek Ziadé