diff options
author | Tom Payerle <payerle@umd.edu> | 2024-02-28 16:00:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-28 13:00:51 -0800 |
commit | 935660e3d5d6e7448d6946c7ace98dac5a0fe533 (patch) | |
tree | d66c156c4c8f27a70ad00d19d1db07b73830b83f /var | |
parent | 17bfc418415cbe4f69fd772b61b89ce7370d2b81 (diff) | |
download | spack-935660e3d5d6e7448d6946c7ace98dac5a0fe533.tar.gz spack-935660e3d5d6e7448d6946c7ace98dac5a0fe533.tar.bz2 spack-935660e3d5d6e7448d6946c7ace98dac5a0fe533.tar.xz spack-935660e3d5d6e7448d6946c7ace98dac5a0fe533.zip |
mysql: explicity cast python command to str in _fix_dtrace_shebang() (#40781)
This should fix issue #40780
We explicitly cast self.spec["python"].command to str in the filter_file
call in _fix_dtrace_shebang to avoid the error
==> Error: TypeError: expected str, bytes or os.PathLike object, not Executable
Not sure why the error is appearing (is it only for specific python versions, etc?),
but the fix should be quite safe.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mysql/package.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/mysql/package.py b/var/spack/repos/builtin/packages/mysql/package.py index 49b79ec40c..36964dfa5a 100644 --- a/var/spack/repos/builtin/packages/mysql/package.py +++ b/var/spack/repos/builtin/packages/mysql/package.py @@ -203,7 +203,7 @@ class Mysql(CMakePackage): copy(dtrace, dtrace_copy) filter_file( "^#!/usr/bin/python", - "#!/usr/bin/env {0}".format(os.path.basename(self.spec["python"].command)), + "#!/usr/bin/env {0}".format(os.path.basename(str(self.spec["python"].command))), dtrace_copy, ) # To have our own copy of dtrace in PATH, we need to |