Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do an incremental build with distutils in python 2.7?

I am using Python 2.7 distutils to build a C++ library. However every time I issue the build command with

python setup.py build

all object files are built again, even though the c++-file did not change.
A friend of mine told me that this would not be the case for Python 2.6.

My questions to this board:

  1. Is there a way to force distutils to incrementally build the code?
  2. If it is not possible to incrementally build the code,
    2.1. is there a way to use Python 2.6 distutils or
    2.2. is it possible to alter the Python 2.7 distuils package?
like image 749
Woltan Avatar asked Sep 16 '25 04:09

Woltan


1 Answers

You can't do that. Compiled .o files were reused in a simplistic and buggy way, so this optimization was removed in 2.7. See http://bugs.python.org/issue5372 for details.

like image 75
merwok Avatar answered Sep 18 '25 18:09

merwok