I'm using Python in the build of a Qt application. The Python script gets called in different PCs and these PCs might have different number of CPUs. To take advantage of that, in the make step I 'm specifying the number of CPUs:
subprocess.call(["mingw32-make",
"-j4"], shell=True, env=environ)
To check the number of CPUs I do:
n = multiprocessing.cpu_count()
How do I replace the -j4
by n
?