Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(129)  |  Call(66)  |  Derive(0)  |  Import(63)
Return true if 'target' is out-of-date with respect to any file
listed in 'sources'.

In other words, if 'target' exists and is newer
than every file in 'sources', return false; otherwise return true.
'missing' controls what we do when a source file is missing; the
default ("error") is to blow up with an OSError from inside 'stat()';
if it is "ignore", we silently drop any missing source files; if it is
"newer", any missing source files make us assume that 'target' is
out-of-date (this is handy in "dry-run" mode: it'll make you pretend to(more...)

        def newer_group(sources, target, missing='error'):
    """Return true if 'target' is out-of-date with respect to any file
    listed in 'sources'.

    In other words, if 'target' exists and is newer
    than every file in 'sources', return false; otherwise return true.
    'missing' controls what we do when a source file is missing; the
    default ("error") is to blow up with an OSError from inside 'stat()';
    if it is "ignore", we silently drop any missing source files; if it is
    "newer", any missing source files make us assume that 'target' is
    out-of-date (this is handy in "dry-run" mode: it'll make you pretend to
    carry out commands that wouldn't work because inputs are missing, but
    that doesn't matter because you're not actually going to run the
    commands).
    """
    # If the target doesn't even exist, then it's definitely out-of-date.
    if not os.path.exists(target):
        return True

    # Otherwise we have to find out the hard way: if *any* source file
    # is more recent than 'target', then 'target' is out-of-date and
    # we can immediately return true.  If we fall through to the end
    # of the loop, then 'target' is up-to-date and we return false.
    target_mtime = os.stat(target)[ST_MTIME]

    for source in sources:
        if not os.path.exists(source):
            if missing == 'error':      # blow up when we stat() the file
                pass
            elif missing == 'ignore':   # missing source dropped from
                continue                #  target's dependency list
            elif missing == 'newer':    # missing source means target is
                return True             #  out-of-date

        if os.stat(source)[ST_MTIME] > target_mtime:
            return True

    return False
        


src/m/i/MissionPlanner-HEAD/Lib/site-packages/numpy/core/code_generators/genapi.py   MissionPlanner(Download)
def should_rebuild(targets, source_files):
    from distutils.dep_util import newer_group
    for t in targets:
        if not os.path.exists(t):
            return True
    sources = API_FILES + list(source_files) + [__file__]
    if newer_group(sources, targets[0], missing='newer'):

src/h/u/hue-HEAD/desktop/core/ext-py/ctypes-1.0.2/setup.py   hue(Download)
                            ext.extra_objects.append("source/libffi_msvc/win64.obj")
 
                            from distutils.dep_util import newer_group
                            if newer_group(["source/libffi_msvc/win64.asm"],
                                           "source/libffi_msvc/win64.obj",

src/n/u/numpy-1.8.1/numpy/core/code_generators/genapi.py   numpy(Download)
def should_rebuild(targets, source_files):
    from distutils.dep_util import newer_group
    for t in targets:
        if not os.path.exists(t):
            return True
    sources = API_FILES + list(source_files) + [__file__]
    if newer_group(sources, targets[0], missing='newer'):

src/h/o/hortonworks-sandbox-HEAD/desktop/core/ext-py/ctypes-1.0.2/setup.py   hortonworks-sandbox(Download)
                            ext.extra_objects.append("source/libffi_msvc/win64.obj")
 
                            from distutils.dep_util import newer_group
                            if newer_group(["source/libffi_msvc/win64.asm"],
                                           "source/libffi_msvc/win64.obj",

src/e/s/essig-HEAD/vm/cython/Cython/Distutils/build_ext.py   essig(Download)
from distutils.errors import DistutilsPlatformError
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.dep_util import newer, newer_group
from distutils import log
from distutils.dir_util import mkpath
            target = pyrex_targets[source]
            depends = [source] + list(extension.depends or ())
            rebuild = self.force or newer_group(depends, target, 'newer')
            if not rebuild and newest_dependency is not None:
                rebuild = newer(newest_dependency, target)

src/c/y/Cython-0.20.1/Cython/Distutils/build_ext.py   Cython(Download)
from distutils.errors import DistutilsPlatformError
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.dep_util import newer, newer_group
from distutils import log
from distutils.dir_util import mkpath
            target = cython_targets[source]
            depends = [source] + list(extension.depends or ())
            rebuild = self.force or newer_group(depends, target, 'newer')
            if not rebuild and newest_dependency is not None:
                rebuild = newer(newest_dependency, target)

src/c/y/cython-HEAD/Cython/Distutils/build_ext.py   cython(Download)
from distutils.errors import DistutilsPlatformError
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.dep_util import newer, newer_group
from distutils import log
from distutils.dir_util import mkpath
            if(source[-4:].lower()==".pyx" and os.path.isfile(source[:-3]+"pxd")):
                depends += [source[:-3]+"pxd"]
            rebuild = self.force or newer_group(depends, target, 'newer')
            if not rebuild and newest_dependency is not None:
                rebuild = newer(newest_dependency, target)

src/c/y/CythonCTypesBackend-HEAD/Cython/Distutils/build_ext.py   CythonCTypesBackend(Download)
from distutils.errors import DistutilsPlatformError
from distutils.sysconfig import customize_compiler, get_python_version
from distutils.dep_util import newer, newer_group
from distutils import log
from distutils.dir_util import mkpath
            target = cython_targets[source]
            depends = [source] + list(extension.depends or ())
            rebuild = self.force or newer_group(depends, target, 'newer')
            if not rebuild and newest_dependency is not None:
                rebuild = newer(newest_dependency, target)

src/4/s/4Suite-XML-1.0.2/Ft/Lib/DistExt/BuildExt.py   4Suite-XML(Download)
from distutils import util, sysconfig
from distutils.command import build_ext
from distutils.dep_util import newer_group, newer
from distutils.version import StrictVersion
 
        for includes in ext.includes.values():
            depends.extend(includes)
        if not (force or newer_group(depends, ext_filename, 'newer')):
            self.announce("skipping '%s' extension (up-to-date)" % ext.name)
            return
                    depends = [source]
                    depends.extend(ext.includes[source])
                    if (newer_group(depends, object, 'newer')
                        or command_mtime > os.stat(object).st_mtime):
                        new_sources.append(source)
                bgen_output = os.path.join(bgen_output, name + '.c')
                # see if the C file needs to be regenerated
                if newer_group([source] + includes, bgen_output):
                    bgen_sources.append(source)
                bgen_outputs.append(bgen_output)

src/m/p/mpi4py-1.3.1/conf/mpidistutils.py   mpi4py(Download)
    def build_library(self, lib):
        from distutils.dep_util import newer_group
 
        sources = [convert_path(p) for p in lib.sources]
        depends = [convert_path(p) for p in lib.depends]
        lib_fullpath = self.get_lib_fullpath(lib, build_dir)
 
        if not (self.force or newer_group(depends, lib_fullpath, 'newer')):
            log.debug("skipping '%s' %s library (up-to-date)",
                      lib.name, lib.kind)
    def build_extension (self, ext):
        from distutils.dep_util import newer_group
        fullname = self.get_ext_fullname(ext.name)
        filename = os.path.join(
            self.build_lib, self.get_ext_filename(fullname))
        depends = ext.sources + ext.depends
        if not (self.force or newer_group(depends, filename, 'newer')):
    def build_executable (self, exe):
        from distutils.dep_util import newer_group
        sources = list(exe.sources)
        depends = list(exe.depends)
        exe_fullpath = self.get_exe_fullpath(exe)

  1 | 2 | 3 | 4 | 5 | 6 | 7  Next