Branch merge

This commit is contained in:
Éric Araujo 2011-08-02 20:01:54 +02:00
commit 3427839c93
3 changed files with 7 additions and 3 deletions

View File

@ -7,6 +7,7 @@ timestamp dependency analysis."""
__revision__ = "$Id$"
import os
from stat import ST_MTIME
from distutils.errors import DistutilsFileError
def newer(source, target):
@ -27,7 +28,7 @@ def newer(source, target):
if not os.path.exists(target):
return True
return os.stat(source).st_mtime > os.stat(target).st_mtime
return os.stat(source)[ST_MTIME] > os.stat(target)[ST_MTIME]
def newer_pairwise(sources, targets):
"""Walk two filename lists in parallel, testing if each source is newer
@ -71,7 +72,7 @@ def newer_group(sources, target, missing='error'):
# 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
target_mtime = os.stat(target)[ST_MTIME]
for source in sources:
if not os.path.exists(source):
@ -82,7 +83,7 @@ def newer_group(sources, target, missing='error'):
elif missing == 'newer': # missing source means target is
return True # out-of-date
if os.stat(source).st_mtime > target_mtime:
if os.stat(source)[ST_MTIME] > target_mtime:
return True
return False

View File

@ -309,6 +309,7 @@ Hans de Graaff
Eddy De Greef
Duncan Grisby
Fabian Groffen
John S. Gruber
Dag Gruneau
Filip Gruszczyński
Michael Guravage

View File

@ -37,6 +37,8 @@ Core and Builtins
Library
-------
- Issue #11933: Fix incorrect mtime comparison in distutils.
- Issues #11104, #8688: Fix the behavior of distutils' sdist command with
manually-maintained MANIFEST files.