Skip to content

Commit

Permalink
unbreak unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Jan 5, 2025
1 parent f51184f commit 3b30569
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2155,21 +2155,21 @@ def finalize_options(self) -> None:
install_data.finalize_options(self)

def run(self) -> None:
install_dir = getattr(self, "install_dir", "")
if install_dir.endswith("egg"):
install_dir = install_dir.split("egg")[1] or sys.prefix
print("install_data_override.run()")
print(f" install_dir={install_dir!r}")

def get_root_prefix() -> str:
install_dir = getattr(self, "install_dir", "")
if install_dir:
if install_dir.endswith("egg"):
install_dir = install_dir.split("egg")[1] or sys.prefix
return install_dir.rstrip("/")
for x in sys.argv:
if x.startswith("--root="):
return x[len("--root="):]
if x.startswith("--prefix="):
return x[len("--prefix="):]
return install_dir.rstrip("/")
return sys.prefix

root_prefix = get_root_prefix()
print(f"{root_prefix=!r}")
if root_prefix.endswith("/usr"):
# "/usr" -> "/etc"
etc_prefix = root_prefix[:-4]+"/etc"
Expand Down

0 comments on commit 3b30569

Please sign in to comment.