Skip to content

Commit

Permalink
Check for chrpath
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Feb 8, 2020
1 parent ed9c9b9 commit 9d1b7ce
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pyMesaUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def buildModule(module):

if MESA_VERSION < 11035:
os.chdir(LIB_DIR)
checkcrpath()
try:
x = subprocess.call("chrpath -r lib"+module+"."+LIB_EXT,shell=True)
if x:
Expand Down Expand Up @@ -192,6 +193,7 @@ def buildRunStarSupport():
os.chdir(cwd)

os.chdir(LIB_DIR)
checkcrpath()
try:
x = subprocess.call("chrpath -r librun_star_support."+LIB_EXT,shell=True)
if x:
Expand Down Expand Up @@ -255,6 +257,7 @@ def buildRunStarExtras(rse=None):
os.chdir(cwd)

os.chdir(LIB_DIR)
checkcrpath()
try:
x = subprocess.call("chrpath -r librun_star_extras."+LIB_EXT,shell=True)
if x:
Expand All @@ -268,3 +271,9 @@ def buildRunStarExtras(rse=None):

class MesaError(Exception):
pass


def checkcrpath():
res = subprocess.call(["command","-v","chrpath"])
if res:
raise ValueError("Please install chrpath")

0 comments on commit 9d1b7ce

Please sign in to comment.