Skip to content

Commit

Permalink
repository: Rename repo_for_target to dir_for_target
Browse files Browse the repository at this point in the history
  • Loading branch information
jrtc27 committed May 15, 2024
1 parent 6387274 commit cb297aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pycheribuild/projects/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ def __init__(
source_project: "type[Project]",
*,
subdirectory=".",
repo_for_target: "Optional[CrossCompileTarget]" = None,
dir_for_target: "Optional[CrossCompileTarget]" = None,
do_update=False,
):
self.source_project = source_project
self.subdirectory = subdirectory
self.repo_for_target = repo_for_target
self.dir_for_target = dir_for_target
self.do_update = do_update

def ensure_cloned(self, current_project: "Project", **kwargs) -> None:
Expand All @@ -118,11 +118,11 @@ def ensure_cloned(self, current_project: "Project", **kwargs) -> None:
def get_real_source_dir(self, caller: SimpleProject, base_project_source_dir: Optional[Path]) -> Path:
if base_project_source_dir is not None:
return base_project_source_dir
return self.source_project.get_source_dir(caller, cross_target=self.repo_for_target) / self.subdirectory
return self.source_project.get_source_dir(caller, cross_target=self.dir_for_target) / self.subdirectory

def update(self, current_project: "Project", *, src_dir: Path, **kwargs):
if self.do_update:
src_proj = self.source_project.get_instance(current_project, cross_target=self.repo_for_target)
src_proj = self.source_project.get_instance(current_project, cross_target=self.dir_for_target)
src_proj.update()
else:
current_project.info(
Expand All @@ -143,7 +143,7 @@ def __init__(self, source_project: "type[Project]", *, subdirectory=".", do_upda
source_project,
subdirectory=subdirectory,
do_update=do_update,
repo_for_target=xtarget,
dir_for_target=xtarget,
)


Expand Down

0 comments on commit cb297aa

Please sign in to comment.