Skip to content

Commit

Permalink
setup: Look for releng in MESON_SOURCE_ROOT first
Browse files Browse the repository at this point in the history
For consistency with the ordering elsewhere.
  • Loading branch information
oleavr committed Apr 23, 2024
1 parent 1f3ae46 commit 17043a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,16 @@ def detect_version() -> str:


def enumerate_releng_locations() -> Iterator[Path]:
local_releng = PACKAGE_DIR / "releng"
if releng_location_exists(local_releng):
yield local_releng

source_root = os.environ.get("MESON_SOURCE_ROOT")
if source_root is not None:
parent_releng = Path(source_root) / "releng"
if releng_location_exists(parent_releng):
yield parent_releng

local_releng = PACKAGE_DIR / "releng"
if releng_location_exists(local_releng):
yield local_releng


def releng_location_exists(location: Path) -> bool:
return (location / "frida_version.py").exists()
Expand Down

0 comments on commit 17043a9

Please sign in to comment.