A couple of updates for python package.#2506
Conversation
|
Will this result in RPATHs in compiled Python extensions? That would be a big benefit. |
|
@skosukhin could you please address the flake8 errors from the CI output? |
|
@citibeth, I think that in some cases it does this even now. I don't know how it's in general yet, but I can tell how it's for the package I'm working on (which extends python and uses numpy's distutils, which are based on the original distutils). The building scenario of the package is the following:
With this PR python package sets environment variable $LDSHARED for the setup_py executable, which should be called by python extension packages. The value of $LDSHARED refers to the compiler the python was build with, which is the spack's wrapper. That means that the final linking is done by the spack's wrapper in the "ccld" mode, so we get the required rpath arguments. So, we get rpaths in a larger number of cases. I'm not sure if we always get them. |
|
I look forward to trying it out. Someday once it's merged, I'll plan on checking my full Python stack for RPATHs. |
|
@skosukhin Do you know if this works with Python2, Python3 or both? See #2350 |
aa6cf78 to
4847892
Compare
|
@skosukhin Is this PR still WIP? I see you've posted new commits recently. |
|
Why not add |
|
@lee218llnl: can you take a quick look at this before we merge it in? If it's ok with you, feel free to merge. |
|
When I test this, I encounter the following error on activate: bash-4.1$ ./bin/spack find bash-4.1$ ./bin/spack activate py-numpy I will do some debugging on my end to see what is causing this, but a pull of develop does not demonstrate this problem. @skosukhin have you tried activating a package with these changes? |
|
@lee218llnl This branch did not include #2524. It does now. Please, try again. |
|
This looks good to me. I can also see with a scipy build that it uses the proper value of LDSHARED. |
This PR contains two updates for the python package: