llnl / llnl/Sina

long paths undermine python wrapper scripts

Open
#2 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5
Forks
2
PR merge metrics
No merged PRs in 30d

Description

I am side-installing sina using pip into a spack-built python.

The spack-built python has a very long path.

This results in a very long shebang in the init_sina.py script that tries to point to python.

`#!/home/user/ascent/uberenv_libs/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.6.3-6lw4xnofwtyaeupgzmvdi7d5e7bfxvj6/bin/python3.6
`

When I try to run, the os truncates:

`No such file or directory: '/home/user/ascent/uberenv_libs/spack/opt/spack/linux-ubuntu18.04-haswell/gcc-7.5.0/python-3.6.3-6lw4xnofwtyaeupgzmvdi7d5e7bfxvj6/bin/init_sina.py`

This could happen with any python installed to a very long path.

Spack actually provides a drop-in script `sbang` that helps resolve this issue.

https://github.com/spack/sbang

(note: if we install via spack, spack does apply the a fix)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting how the pip installation generates the init_sina.py wrapper and review Spack's sbang behavior. Reproduce the failure with Python installed under a similarly long path. Done means the installed wrapper runs without shebang truncation while ordinary Python installations continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.