[Python-Dev] distutils 'depends' management (original) (raw)
Matteo Bertini matteo at naufraghi.net
Wed Jan 25 10:41:20 CET 2012
- Previous message: [Python-Dev] io module types
- Next message: [Python-Dev] [Python-ideas] Coroutines and PEP 380
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello, I've noted that distutils manages depends in a way I cannot understand.
Suppose I have a minimal setup.py:
from distutils.core import setup, Extension setup( name='foo', version='1.0', ext_modules=[ Extension('foo', sources=['foo.c'], depends=['fop.conf'] # <---- note the typo foo->fop ), ] )
Now setup.py will rebuild all every time, this is because the policy of newer_group in build_extension is to consider 'newer' any missing file.
def build_extension(self, ext): ... depends = sources + ext.depends if not (self.force or newer_group(depends, ext_path, 'newer')): logger.debug("skipping '%s' extension (up-to-date)", ext.name) return else: logger.info("building '%s' extension", ext.name) ...
Can someone suggest me the reason of this choice instead of missing='error' (at least for ext.depends)?
Cheers, Matteo
- Previous message: [Python-Dev] io module types
- Next message: [Python-Dev] [Python-ideas] Coroutines and PEP 380
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]