Skip to content

Commit

Permalink
adds python binder
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Oct 24, 2022
1 parent 54fabd7 commit 633e277
Show file tree
Hide file tree
Showing 3 changed files with 509 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hooks/post_gen_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,25 @@ def create_repo_folder():
shutil.rmtree(".gitlab")


def check_python():
is_pyconfig = "python" in SELECTED_DOCKER_BASE

for fp in Path(".osparc").glob("Python.*"):
if fp.is_file():
if is_pyconfig:
fp.rename(fp.parent / fp.name.removeprefix("Python."))
else:
fp.unlink(missing_ok=True)

# TODO: if python, then service.cli has to be removed!


def main():
try:
create_dockerfile()
create_ignore_listings()
create_repo_folder()
check_python()
except Exception as exc: # pylint: disable=broad-except
print(exc)
return os.EX_SOFTWARE
Expand Down
Loading

0 comments on commit 633e277

Please sign in to comment.