forked from semios/semios-packages
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f06471aa2 |
+12
-1
@@ -1,6 +1,7 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
if sys.version_info >= (3, 14):
|
if sys.version_info >= (3, 14):
|
||||||
@@ -45,4 +46,14 @@ class PkgComposer:
|
|||||||
shutil.copy2(src, f"{self.workdir}/bundle/{dst}", follow_symlinks=False)
|
shutil.copy2(src, f"{self.workdir}/bundle/{dst}", follow_symlinks=False)
|
||||||
|
|
||||||
def add_dir(self, src: str, dst: str, merge: bool = False):
|
def add_dir(self, src: str, dst: str, merge: bool = False):
|
||||||
shutil.copytree(src, f"{self.workdir}/bundle/{dst}", dirs_exist_ok=merge)
|
target = f"{self.workdir}/bundle/{dst}"
|
||||||
|
if not os.path.exists(src):
|
||||||
|
raise FileNotFoundError(f"Source directory not found: {src}")
|
||||||
|
os.makedirs(os.path.dirname(target), exist_ok=True)
|
||||||
|
if merge and os.path.exists(target) and os.path.isdir(target):
|
||||||
|
cmd = ["cp", "-a", f"{src}/.", target]
|
||||||
|
else:
|
||||||
|
cmd = ["cp", "-a", src, target]
|
||||||
|
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||||
|
if result.returncode != 0:
|
||||||
|
raise RuntimeError(f"cp command failed: {result.stderr}")
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ dep("semi-libc @same-arch")
|
|||||||
package("pkgconf")
|
package("pkgconf")
|
||||||
cpp.use_auto_pack(["bin"])
|
cpp.use_auto_pack(["bin"])
|
||||||
dep("libpkgconf (same)")
|
dep("libpkgconf (same)")
|
||||||
link("bin/pkgconf", "/bin/pkg-config")
|
|
||||||
|
|
||||||
package("libpkgconf-dev")
|
package("libpkgconf-dev")
|
||||||
cpp.use_auto_pack(["dev"])
|
cpp.use_auto_pack(["dev"])
|
||||||
|
|||||||
Reference in New Issue
Block a user