diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-12-20 01:47:52 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-12-20 01:47:52 +0100 |
commit | a56150849855716820b1c4f771b5b94716e66a00 (patch) | |
tree | 508133f1e12b2bca2b9fdceb318d095ee2391ae1 /bin | |
parent | 3f4fff9ae43b20fc54034a86a9327d0c682578db (diff) | |
download | deployment-a56150849855716820b1c4f771b5b94716e66a00.tar.gz deployment-a56150849855716820b1c4f771b5b94716e66a00.tar.bz2 deployment-a56150849855716820b1c4f771b5b94716e66a00.zip |
remove as_posix, typo
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/taler-deployment | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/bin/taler-deployment b/bin/taler-deployment index 2c7b16a..9728179 100755 --- a/bin/taler-deployment +++ b/bin/taler-deployment @@ -89,14 +89,14 @@ def update_checkout(r: Repo, p: Path): """Clean the repository's working directory and update it to the match the latest version of the upstream branch that we are tracking.""" - subprocess.run(["git", "-C", p.as_posix(), "clean", "-fdx"], check=True) - subprocess.run(["git", "-C", p.as_posix(), "fetch"], check=True) - subprocess.run(["git", "-C", p.as_posix(), "reset"], check=True) + subprocess.run(["git", "-C", str(p), "clean", "-fdx"], check=True) + subprocess.run(["git", "-C", str(p), "fetch"], check=True) + subprocess.run(["git", "-C", str(p), "reset"], check=True) res = subprocess.run( [ "git", "-C", - p.as_posix(), + str(p), "rev-parse", "--abbrev-ref", "--symbolic-full-name", @@ -111,7 +111,7 @@ def update_checkout(r: Repo, p: Path): else: ref = res.stdout.strip("\n ") print(f"resetting {r.name} to ref {ref}") - subprocess.run(["git", "-C", p.as_posix(), "reset", "--hard", ref], check=True) + subprocess.run(["git", "-C", str(p), "reset", "--hard", ref], check=True) def default_configure(*extra): @@ -120,7 +120,7 @@ def default_configure(*extra): if int(os.environ.get("TALER_COVERAGE")): extra_list.append("--enable-coverage") subprocess.run( - ["./configure", f"--prefix={pfx.as_posix()}"] + extra_list, check=True + ["./configure", f"--prefix={pfx}"] + extra_list, check=True ) @@ -145,8 +145,8 @@ def build_gnunet(r: Repo, p: Path): pfx = Path.home() / "local" default_configure( "--enable-logging=verbose", - f"--with-libgnurl={pfx.as_posix()}", - f"--with-microhttpd={pfx.as_posix()}", + f"--with-libgnurl={pfx}", + f"--with-microhttpd={pfx}", "--disable-documentation", ) subprocess.run(["make", "install"], check=True) @@ -160,9 +160,9 @@ def build_exchange(r: Repo, p: Path): default_configure( "CFLAGS=-ggdb -O0", "--enable-logging=verbose", - f"--with-libgnurl={pfx.as_posix()}", - f"--with-microhttpd={pfx.as_posix()}", - f"--with-gnunet={pfx.as_posix()}", + f"--with-libgnurl={pfx}", + f"--with-microhttpd={pfx}", + f"--with-gnunet={pfx}", ) subprocess.run(["make", "install"], check=True) (p / "taler-buildstamp").touch() @@ -175,8 +175,8 @@ def build_twister(r, p): default_configure( "CFLAGS=-ggdb -O0", "--enable-logging=verbose", - f"--with-exchange={pfx.as_posix()}", - f"--with-gnunet={pfx.as_posix()}", + f"--with-exchange={pfx}", + f"--with-gnunet={pfx}", ) subprocess.run(["make", "install"], check=True) (p / "taler-buildstamp").touch() @@ -189,10 +189,10 @@ def build_merchant(r, p): default_configure( "CFLAGS=-ggdb -O0", "--enable-logging=verbose", - f"--with-libgnurl={pfx.as_posix()}", - f"--with-microhttpd={pfx.as_posix()}", - f"--with-exchange={pfx.as_posix()}", - f"--with-gnunet={pfx.as_posix()}", + f"--with-libgnurl={pfx}", + f"--with-microhttpd={pfx}", + f"--with-exchange={pfx}", + f"--with-gnunet={pfx)}", "--disable-doc", ) subprocess.run(["make", "install"], check=True) @@ -376,9 +376,9 @@ def ensure_activated(): def update_repos(repos: List[Repo]) -> None: for r in repos: r_dir = Path.home() / "sources" / r.name - subprocess.run(["git", "-C", r_dir.as_posix(), "fetch"], check=True) + subprocess.run(["git", "-C", str(r_dir), "fetch"], check=True) res = subprocess.run( - ["git", "-C", r_dir.as_posix(), "status", "-sb"], + ["git", "-C", str(r_dir), "status", "-sb"], check=True, stdout=subprocess.PIPE, encoding="utf-8", @@ -452,7 +452,7 @@ def build() -> None: print(f"found stale repos: {stale}") for r in stale: p = Path.home() / "sources" / r.name - os.chdir(p.as_posix()) + os.chdir(str(p)) r.builder(r, p) # type: ignore @@ -480,12 +480,12 @@ def checkout_repos(r): if not r_dir.exists(): r_dir.mkdir(parents=True, exist_ok=True) subprocess.run( - ["git", "-C", sources.as_posix(), "clone", r.url], check=True + ["git", "-C", str(sources), "clone", r.url], check=True ) tag = getattr(cfg, "tag_" + r.name) - subprocess.run(["git", "-C", r_dir.as_posix(), "fetch"], check=True) + subprocess.run(["git", "-C", str(r_dir), "fetch"], check=True) subprocess.run( - ["git", "-C", r_dir.as_posix(), "checkout", "-q", "-f", tag, "--"], + ["git", "-C", str(r_dir), "checkout", "-q", "-f", tag, "--"], check=True, ) @@ -500,10 +500,10 @@ def sync_repos() -> None: return 1 env_info = get_env_info(cfg) repos = env_info.repos - checkout_repos(r) + checkout_repos(repos) for r in repos: r_dir = home / "sources" / r.name - subprocess.run(["git", "-C", r_dir.as_posix(), "clean", "-fdx"], check=True) + subprocess.run(["git", "-C", str(r_dir), "clean", "-fdx"], check=True) @cli.command() @@ -520,7 +520,7 @@ def bootstrap() -> None: repos = env_info.repos envname = env_info.name - checkout_repos(r) + checkout_repos(repos) with (home / "activate").open("w") as f: f.write( @@ -577,7 +577,7 @@ def create_bb_worker(dirname, workername, workerpw): "buildbot-worker", "create-worker", "--umask=0o22", - bb_dir.as_posix(), + str(bb_dir), "localhost:9989", workername, workerpw, |