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

Relative path in $file.link not relative to position of file #2

Open
dagss opened this issue Jun 26, 2013 · 3 comments
Open

Relative path in $file.link not relative to position of file #2

dagss opened this issue Jun 26, 2013 · 3 comments

Comments

@dagss
Copy link
Member

dagss commented Jun 26, 2013

@cekees , I believe this commit should fix the issue you mentioned in email with relative paths not working in local/bin/python.link. Will wait for your verification before closing. (I didn't push it to python-hpcmp2 yet, so put the commit hash below into packages.yml)

1ae1868

@cekees
Copy link
Contributor

cekees commented Jun 27, 2013

@dagg, That fixes it. FYI, there are some additional print statements
adding to the output. They look like this:

HELLO
/Users/cekees/proteus/darwin/bin/../../hashstack/opt/python/pahz/bin/python2.7

On Wed, Jun 26, 2013 at 4:12 AM, Dag Sverre Seljebotn <
[email protected]> wrote:

@cekees https://github.com/cekees , I believe this commit should fix
the issue you mentioned in email with relative paths not working in
local/bin/python.link. Will wait for your verification before closing. (I
didn't push it to python-hpcmp2 yet, so put the commit hash below into
packages.yml)

1ae18681ae1868


Reply to this email directly or view it on GitHubhttps://github.com//issues/2
.

@cekees
Copy link
Contributor

cekees commented Jun 27, 2013

I take that back. There is still something strange going on. When I use the
full path to python things seem ok, but when I set my path and let the
shell find python (in the same location), I can't import installed modules:

[minikees:] cekees% which python
/Users/cekees/proteus/darwin/bin/python
[minikees:
] cekees% python
HELLO
/Users/cekees/proteus/darwin/bin/../../hashstack/opt/python/pahz/bin/python2.7
Python 2.7.5 (default, Jun 26 2013, 12:41:14)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.

import numpy
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named numpy

[minikees:~] cekees% /Users/cekees/proteus/darwin/bin/python
HELLO
/Users/cekees/proteus/darwin/bin/../../hashstack/opt/python/pahz/bin/python2.7
Python 2.7.5 (default, Jun 26 2013, 12:41:14)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on
darwin
Type "help", "copyright", "credits" or "license" for more information.
import numpy

On Thu, Jun 27, 2013 at 11:04 AM, Chris Kees [email protected] wrote:

@dagg, That fixes it. FYI, there are some additional print statements
adding to the output. They look like this:

HELLO
/Users/cekees/proteus/darwin/bin/../../hashstack/opt/python/pahz/bin/python2.7

On Wed, Jun 26, 2013 at 4:12 AM, Dag Sverre Seljebotn <
[email protected]> wrote:

@cekees https://github.com/cekees , I believe this commit should fix
the issue you mentioned in email with relative paths not working in
local/bin/python.link. Will wait for your verification before closing.
(I didn't push it to python-hpcmp2 yet, so put the commit hash below into
packages.yml)

1ae18681ae1868


Reply to this email directly or view it on GitHubhttps://github.com//issues/2
.

@cekees
Copy link
Contributor

cekees commented Jan 30, 2014

Several guys at my lab are trying to use hashstack on various versions of mac os x, and we are all still getting this behavior where sys.path is not set correctly if we put the development profile bin dir in our path. @dagss I'm not sure it's a launcher problem, or at least as far as I can tell launcher is extracting precisely the same information in both cases based on the debugging output You can see below (os x 10.7 machine) that the only difference is whether python is called with the full path or letting the shell resolve it. Using the full path results in the correct sys.path, otherwise sys.path points to the python artifact, which contains no packages:

kees:~ buildbot$ python -c "import sys; print sys.path"
launcher:DEBUG:start='/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python'
launcher:DEBUG:readlink=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python -> python2
launcher:DEBUG:readlink=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python2 -> python2.7
launcher:DEBUG:readlink=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python2.7 -> launcher
launcher:DEBUG:caller=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python2.7
launcher:DEBUG:PROFILE_BIN_DIR=
launcher:DEBUG:ORIGIN=/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/bin
launcher:DEBUG:program=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/../../../../../.hashdist/bld/python/fv2gsgreku2m/bin/python2.7
['', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python27.zip', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/plat-darwin', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/plat-mac', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/lib-tk', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/lib-old', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/lib-dynload', '/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/lib/python2.7/site-packages']

kees:~ buildbot$ which python
/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python
kees:~ buildbot$ /Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python -c "import sys; print sys.path"
launcher:DEBUG:start='/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python'
launcher:DEBUG:readlink=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python -> python2
launcher:DEBUG:readlink=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python2 -> python2.7
launcher:DEBUG:readlink=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python2.7 -> launcher
launcher:DEBUG:caller=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/python2.7
launcher:DEBUG:PROFILE_BIN_DIR=
launcher:DEBUG:ORIGIN=/Users/buildbot/.hashdist/bld/python/fv2gsgreku2m/bin
launcher:DEBUG:program=/Users/buildbot/proteusbasedir/darwin/build/darwin/bin/../../../../../.hashdist/bld/python/fv2gsgreku2m/bin/python2.7
['', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python27.zip', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/plat-darwin', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/plat-mac', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/plat-mac/lib-scriptpackages', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/lib-tk', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/lib-old', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/lib-dynload', '/Users/buildbot/proteusbasedir/darwin/build/darwin/lib/python2.7/site-packages']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants