Skip to content

Commit

Permalink
Merge pull request #272 from koterpillar/derive-raw-executable
Browse files Browse the repository at this point in the history
feat: derive raw_executable
  • Loading branch information
koterpillar authored Oct 30, 2024
2 parents c42ad03 + 7bf917e commit ced95d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions mybox/package/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

class ArchivePackage(ManualPackage, ABC):
raw: bool | str = False
raw_executable: bool = False

binary_paths: list[str] = Field(default_factory=list, alias="binary_path")
binary_paths_val = allow_singular_none("binary_paths")
Expand Down Expand Up @@ -54,7 +53,7 @@ async def extract_raw(self, url: str, source: Path, filename: str) -> None:

extractor = await get_single_extractor(url, driver=self.driver)
await extractor.extract(archive=source, target=target)
if self.raw_executable:
if filename in self.binaries:
await self.driver.make_executable(target)

async def find_in_package_directory(
Expand Down
3 changes: 0 additions & 3 deletions tests/package/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ async def constructor_args(self) -> PackageArgs:
"repo": "com-lihaoyi/Ammonite",
"regex": r"^2\.13-3\.[0-9]+\.[0-9]+-M[0-9]-bootstrap$",
"raw": "amm",
"raw_executable": True,
"binary": "amm",
"skip_release": "3.0.0",
}
Expand Down Expand Up @@ -131,7 +130,6 @@ async def constructor_args(self) -> PackageArgs:
"repo": "jqlang/jq",
"binary": "jq",
"raw": "jq",
"raw_executable": True,
}

async def check_installed_command(self):
Expand Down Expand Up @@ -171,7 +169,6 @@ async def constructor_args(self) -> PackageArgs:
"repo": "argoproj/argo-workflows",
"binary": "argo",
"raw": "argo",
"raw_executable": True,
}

async def check_installed_command(self):
Expand Down

0 comments on commit ced95d0

Please sign in to comment.