Skip to content

Commit 7b39ad7

Browse files
author
Kevin D Smith
committed
Fix issue with conda build on Windows
1 parent 6573f1a commit 7b39ad7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

cicd/tar2conda.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,15 @@ def main(url, args):
306306
shutil.copy(ext, os.path.join('swat', 'lib', platform, ext))
307307

308308
print_err('>' + ' '.join(cmd))
309-
subprocess.check_call(cmd)
309+
try:
310+
print_err(subprocess.check_output(cmd))
311+
except subprocess.CalledProcessError as exc:
312+
out = output.encode('utf-8')
313+
print_err(out)
314+
# Conda build fails intermittently on Windows when cleaning
315+
# up at the end. Ignore these errors on Windows.
316+
if not ('WinError 32' in out and 'used by another process' in out):
317+
raise
310318

311319
for ext in glob.glob(os.path.join(tmpext, extbase + '.*')):
312320
print_err('> remove %s' % ext)

0 commit comments

Comments
 (0)