diff options
author | Wileam Y. Phan <50928756+wyphan@users.noreply.github.com> | 2022-04-27 20:16:19 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 00:16:19 +0000 |
commit | ebd930ace9681ca800dd6f6d1707d00e6e31cf28 (patch) | |
tree | 73136a641a1bb25b657ae07e3e2873469b9a31a8 | |
parent | 53e0e7aabe7f101766467b6f8a5d69932fb14116 (diff) | |
download | spack-ebd930ace9681ca800dd6f6d1707d00e6e31cf28.tar.gz spack-ebd930ace9681ca800dd6f6d1707d00e6e31cf28.tar.bz2 spack-ebd930ace9681ca800dd6f6d1707d00e6e31cf28.tar.xz spack-ebd930ace9681ca800dd6f6d1707d00e6e31cf28.zip |
Add Python `chmod +x` equivalent in `fpm` package (#30342)
-rw-r--r-- | var/spack/repos/builtin/packages/fpm/package.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/fpm/package.py b/var/spack/repos/builtin/packages/fpm/package.py index d13b4a2c45..e2784ea726 100644 --- a/var/spack/repos/builtin/packages/fpm/package.py +++ b/var/spack/repos/builtin/packages/fpm/package.py @@ -3,6 +3,9 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os +import stat + from spack import * @@ -52,7 +55,12 @@ class Fpm(Package): 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): |