mirror of https://gitlab.com/ita1024/waf.git
Remove the private Scripting._can_distclean function
This commit is contained in:
parent
bc3915c90a
commit
09f67a3b3a
|
@ -269,13 +269,6 @@ def run_commands():
|
|||
|
||||
###########################################################################################
|
||||
|
||||
def _can_distclean(name):
|
||||
# WARNING: this method may disappear anytime
|
||||
for k in '.o .moc .exe'.split():
|
||||
if name.endswith(k):
|
||||
return True
|
||||
return False
|
||||
|
||||
def distclean_dir(dirname):
|
||||
"""
|
||||
Distclean function called in the particular case when::
|
||||
|
@ -287,7 +280,7 @@ def distclean_dir(dirname):
|
|||
"""
|
||||
for (root, dirs, files) in os.walk(dirname):
|
||||
for f in files:
|
||||
if _can_distclean(f):
|
||||
if f.endswith(('.o', '.moc', '.exe')):
|
||||
fname = os.path.join(root, f)
|
||||
try:
|
||||
os.remove(fname)
|
||||
|
@ -559,7 +552,7 @@ class DistCheck(Dist):
|
|||
instdir = tempfile.mkdtemp('.inst', self.get_base_name())
|
||||
ret = Utils.subprocess.Popen([sys.executable, sys.argv[0], 'configure', 'install', 'uninstall', '--destdir=' + instdir] + cfg, cwd=self.get_base_name()).wait()
|
||||
if ret:
|
||||
raise Errors.WafError('distcheck failed with code %i' % ret)
|
||||
raise Errors.WafError('distcheck failed with code %r' % ret)
|
||||
|
||||
if os.path.exists(instdir):
|
||||
raise Errors.WafError('distcheck succeeded, but files were left in %s' % instdir)
|
||||
|
|
|
@ -458,7 +458,7 @@ def check_python_version(conf, minver=None):
|
|||
cmd = pybin + ['-c', 'import sys\nfor x in sys.version_info: print(str(x))']
|
||||
Logs.debug('python: Running python command %r', cmd)
|
||||
lines = conf.cmd_and_log(cmd).split()
|
||||
assert len(lines) == 5, "found %i lines, expected 5: %r" % (len(lines), lines)
|
||||
assert len(lines) == 5, "found %r lines, expected 5: %r" % (len(lines), lines)
|
||||
pyver_tuple = (int(lines[0]), int(lines[1]), int(lines[2]), lines[3], int(lines[4]))
|
||||
|
||||
# compare python version with the minimum required
|
||||
|
|
Loading…
Reference in New Issue