Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helping user scripts use bin/sbang #10

Open
hartzell opened this issue Jun 6, 2017 · 0 comments
Open

Helping user scripts use bin/sbang #10

hartzell opened this issue Jun 6, 2017 · 0 comments
Labels
question Further information is requested

Comments

@hartzell
Copy link

hartzell commented Jun 6, 2017

In a recent PR I pontificated about the importance of hardwiring the sbang line so that scripts use the interpreter with which they were built.

In the ongoing discussion about LD_LIBRARY_PATH I've learned that it's important to help "user-space" people use Spack-managed trees to build their own software.

Today I helped a "user-space" someone use the perl and cpanm from one of my test trees to install a CPAN-style distro, only to discover that the resulting sbang line in the distro's scripts was too long. (First we rediscovered spack/spack#4338, but that's fixed). My production trees have paths that squeak in under the line, phew.

Does anyone have any experience with helping "user-space" people use Spacks sbang-ification tools? Documentation about how they might use Spack sbanging code?

It seems as if one could write a fairly short script that accepted a directory name, imported the bits from lib/spack/spack/hooks/sbang.py and then called filter_shebangs_in_directory on it.

Perhaps I should write one and PR it to live in the bin directory alongside the spack command?

Is there a better solution?

@adamjstewart adamjstewart added the question Further information is requested label Jun 7, 2017
@alalazo alalazo transferred this issue from spack/spack May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants