mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-12 18:59:50 +03:00
31 lines
879 B
Diff
31 lines
879 B
Diff
Patch-Source: https://aur.archlinux.org/cgit/aur.git/tree/build-ac.index-in-tmp.diff?h=aws-cli-v2
|
|
---
|
|
--- a/backends/pep517.py
|
|
+++ b/backends/pep517.py
|
|
@@ -33,6 +33,7 @@
|
|
import shutil
|
|
import sys
|
|
import tarfile
|
|
+import tempfile
|
|
import zipfile
|
|
from pathlib import Path
|
|
|
|
@@ -216,14 +217,16 @@
|
|
|
|
|
|
def _build_and_inject_ac_index(build_dir, extracted_wheel_dir):
|
|
- ac_index_build_name = _build_ac_index(build_dir)
|
|
+ ac_index_dir = tempfile.mkdtemp()
|
|
+ ac_index_build_name = _build_ac_index(ac_index_dir)
|
|
extracted_ac_index = os.path.join(extracted_wheel_dir, AC_INDEX_REL_PATH)
|
|
_remove_file_if_exists(extracted_ac_index)
|
|
print("Adding auto-complete index into wheel")
|
|
- os.rename(
|
|
+ shutil.copy2(
|
|
ac_index_build_name,
|
|
extracted_ac_index,
|
|
)
|
|
+ shutil.rmtree(ac_index_dir)
|
|
|
|
|
|
def _build_ac_index(build_dir, rebuild=True):
|