Add Python chmod +x
equivalent in fpm
package (#30342)
This commit is contained in:
parent
53e0e7aabe
commit
ebd930ace9
@ -3,6 +3,9 @@
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
|
||||
import os
|
||||
import stat
|
||||
|
||||
from spack import *
|
||||
|
||||
|
||||
@ -52,7 +55,12 @@ def install(self, spec, prefix):
|
||||
This functionality is provided by the ``install.sh`` script.
|
||||
"""
|
||||
|
||||
script = Executable("./install.sh")
|
||||
# Perform `chmod +x ./install.sh`
|
||||
script_path = './install.sh'
|
||||
st = os.stat(script_path)
|
||||
os.chmod(script_path, st.st_mode | stat.S_IXUSR)
|
||||
|
||||
script = Executable(script_path)
|
||||
script(*self.install_args())
|
||||
|
||||
def install_args(self):
|
||||
|
Loading…
Reference in New Issue
Block a user