|
1 | 1 | # |
2 | | -# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | # |
5 | 5 | # This code is free software; you can redistribute it and/or modify it |
|
24 | 24 | import mx_sdk |
25 | 25 | import os, string, shutil |
26 | 26 | from os.path import join, basename, isfile |
27 | | -import distutils |
28 | | -# for some reason the script fails without this import: |
29 | | -from distutils import dir_util # pylint: disable=unused-import,no-name-in-module |
30 | 27 |
|
31 | 28 | _fastr_suite = mx.suite('fastr') |
32 | 29 |
|
@@ -84,7 +81,10 @@ def build(self): |
84 | 81 | fastr_dir = _fastr_suite.dir |
85 | 82 | for d in ['bin', 'include', 'library', 'etc', 'share', 'doc']: |
86 | 83 | target_dir = join(output_dir, d) |
87 | | - distutils.dir_util.copy_tree(join(fastr_dir, d), target_dir, update=True) |
| 84 | + source_dir = join(fastr_dir, d) |
| 85 | + if os.path.exists(target_dir): |
| 86 | + shutil.rmtree(target_dir) |
| 87 | + shutil.copytree(source_dir, target_dir) |
88 | 88 |
|
89 | 89 | lib_fastr_dir = join(fastr_dir, 'lib') |
90 | 90 | lib_output_dir = join(output_dir, 'lib') |
|
0 commit comments