Skip to content

Commit

Permalink
dont change writable flags by default
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangWaltenberger committed Jan 19, 2024
1 parent 78ebf2a commit 1652d97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions smodels/lib/pythia8/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def compilePythia():
sys.stdout.buffer.write(c)
sys.stdout.buffer.flush()

def fixACLs():
def protectInstall():
""" finally, remove all writable flags from install. when running
many pythia8 instances in parallel, for some reason they sometimes deleted
files from the install, making the install unusable """
Expand All @@ -165,14 +165,16 @@ def installPythia():
fetch()
unzip()
compilePythia()
fixACLs()
# protectInstall() # dont do this by default
rmTarball()

if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="pythia8 install script" )
parser.add_argument( '-i', '--install', help='install pythia8',
action='store_true')
parser.add_argument( '-p', '--protect', help='protect pythia8 install',
action='store_true')
parser.add_argument( '-v', '--version', help='report pythiaversion',
action='store_true')
args = parser.parse_args()
Expand All @@ -184,3 +186,5 @@ def installPythia():
# just to suppress a warning msg in github actions
os.environ["TERM"]="xterm"
installPythia()
if args.protect:
protectInstall()

0 comments on commit 1652d97

Please sign in to comment.