archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / aws-cli-v2 / repos / community-any / build-ac.index-in-tmp.diff
blob40c5fb5eff8f3ff7dfd22095a796e5cf272fcea4
1 --- a/backends/pep517.py 2023-02-16 02:15:30.000000000 +0800
2 +++ b/backends/pep517.py 2023-02-18 01:31:54.245328767 +0800
3 @@ -30,6 +30,7 @@
4 import os
5 import glob
6 import tarfile
7 +import tempfile
8 import shutil
9 import sys
10 import zipfile
11 @@ -214,14 +215,16 @@
14 def _build_and_inject_ac_index(build_dir, extracted_wheel_dir):
15 - ac_index_build_name = _build_ac_index(build_dir)
16 + ac_index_dir = tempfile.mkdtemp()
17 + ac_index_build_name = _build_ac_index(ac_index_dir)
18 extracted_ac_index = os.path.join(extracted_wheel_dir, AC_INDEX_REL_PATH)
19 _remove_file_if_exists(extracted_ac_index)
20 print("Adding auto-complete index into wheel")
21 - os.rename(
22 + shutil.copy2(
23 ac_index_build_name,
24 extracted_ac_index,
26 + shutil.rmtree(ac_index_dir)
29 def _build_ac_index(build_dir, rebuild=True):