Migrate to uv

This commit is contained in:
Kivi Kaitaniemi
2025-12-12 17:03:15 +02:00
parent a566adf546
commit 9da024c8bd
13 changed files with 272 additions and 216 deletions
+8 -13
View File
@@ -1,5 +1,4 @@
import os
import shutil
import sys
# This test is manual. You'll have to verify the results manually.
@@ -12,23 +11,22 @@ os.chdir(cd)
sys.path.append(os.path.join(cd, "../../src/."))
from decman import File, Directory
from decman import Directory, File
#if os.path.exists("/tmp/decman-files"):
# if os.path.exists("/tmp/decman-files"):
# shutil.rmtree("/tmp/decman-files")
#os.makedirs("/tmp/decman-files")
# os.makedirs("/tmp/decman-files")
f1 = File(source_file="src/f1.txt")
f1.copy_to(
"/tmp/decman-files/f1.txt",
variables={
"%variable%": "123",
"%another_variable%": "456"
},
variables={"%variable%": "123", "%another_variable%": "456"},
)
f2 = File(source_file="src/f2.sh", permissions=0o744)
f2.copy_to("/tmp/decman-files/f2.sh", )
f2.copy_to(
"/tmp/decman-files/f2.sh",
)
f3 = File(content="%variable% doesn't work here.", bin_file=True)
f3.copy_to(
@@ -46,10 +44,7 @@ f4.copy_to(
},
)
f5 = File(content="%variable% works here.",
bin_file=False,
owner=user,
group="root")
f5 = File(content="%variable% works here.", bin_file=False, owner=user, group="root")
f5.copy_to(
"/tmp/decman-files/f5.txt",
variables={