Skip to content
Snippets Groups Projects
Commit 65af81dd authored by nfontrod's avatar nfontrod
Browse files

src/find_interaction_cluster/install_hipMCL.py: Creation of a script to install and compile hipmcl

parent fc58b721
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Description: Download and install hipMCL
"""
import subprocess as sp
from pathlib import Path
from .config import ConfigGraph
def download_hipmcl(outfile: Path):
"""
Download the hipmlc script.
:param outfile: The output folder where hipMCL algorithm will \
be downloaded.
:return: The folder containing hipMCL file
"""
cmd = f"curl https://bitbucket.org/azadcse/hipmcl/get/6fa32bbcb4bc.zip " \
f"--output {outfile}"
sp.check_call(cmd, shell=True, stderr=sp.STDOUT)
cmd2 = f"unzip {outfile} -d {ConfigGraph.data}"
sp.check_call(cmd2, shell=True, stderr=sp.STDOUT)
def compilation(hip_folder: Path):
"""
Compile hip_folder.
:param hip_folder: Folder with hipfile
"""
cmd = f"ln -s {hip_folder}/makefile-mac {hip_folder}/Makefile && " \
f"(cd {hip_folder} && make hipmcl)"
sp.check_call(cmd, shell=True, stderr=sp.STDOUT)
def install_hipmcl():
"""
INstall hipMCL.
"""
download_hipmcl(ConfigGraph.hip_zip)
compilation(ConfigGraph.get_hip_folder())
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment