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
Setuptools needs to be vendored #9034
Comments
fixes spack#9206 fixes spack#9034 A possible solution to spack#9206 is to avoid running `import site` and all the initialization procedures that this entails. This requires us to use `python -S` as an interpreter, instead of plain `python`. Of course things can't be that simple. In Linux (but not in BSD or MacOS) the shebang pass a single string argument to the interpreter. More details on the subject are here: http://sambal.org/2014/02/passing-options-node-shebang-line/ https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md#shebang-interpretation but the bottom line is that this requires us to have a wrapper bash script that invokes the interpreter with the correct option. Finally, as now we are not picking up anything from the 'site', we need to vendor `setuptools` (which was still missing).
fixes spack#9206 fixes spack#9034 A possible solution to spack#9206 is to avoid running `import site` and all the initialization procedures that this entails. This requires us to use `python -S` as an interpreter, instead of plain `python`. Of course things can't be that simple. In Linux (but not in BSD or MacOS) the shebang pass a single string argument to the interpreter. More details on the subject are here: http://sambal.org/2014/02/passing-options-node-shebang-line/ https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md#shebang-interpretation but the bottom line is that this requires us to have a wrapper bash script that invokes the interpreter with the correct option. Finally, as now we are not picking up anything from the 'site', we need to vendor `setuptools` (which was still missing).
fixes spack#9206 fixes spack#9034 A possible solution to spack#9206 is to avoid running `import site` and all the initialization procedures that this entails. This requires us to use `python -S` as an interpreter, instead of plain `python`. Of course things can't be that simple. In Linux (but not in BSD or MacOS) the shebang pass a single string argument to the interpreter. More details on the subject are here: http://sambal.org/2014/02/passing-options-node-shebang-line/ https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md#shebang-interpretation but the bottom line is that this requires us to have a wrapper bash script that invokes the interpreter with the correct option. Finally, as now we are not picking up anything from the 'site', we need to vendor `setuptools` (which was still missing).
fixes spack#9206 fixes spack#9034 A possible solution to spack#9206 is to avoid running `import site` and all the initialization procedures that this entails. This requires us to use `python -S` as an interpreter, instead of plain `python`. Of course things can't be that simple. In Linux (but not in BSD or MacOS) the shebang pass a single string argument to the interpreter. More details on the subject are here: http://sambal.org/2014/02/passing-options-node-shebang-line/ https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md#shebang-interpretation but the bottom line is that this requires us to have a wrapper bash script that invokes the interpreter with the correct option. Finally, as now we are not picking up anything from the 'site', we need to vendor `setuptools` (which was still missing).
fixes spack#9206 fixes spack#9034 A possible solution to spack#9206 is to avoid running `import site` and all the initialization procedures that this entails. This requires us to use `python -S` as an interpreter, instead of plain `python`. Of course things can't be that simple. In Linux (but not in BSD or MacOS) the shebang pass a single string argument to the interpreter. More details on the subject are here: http://sambal.org/2014/02/passing-options-node-shebang-line/ https://github.com/smikes/node/blob/minus-x-switch/doc/Minus-X-Switch-Proposal.md#shebang-interpretation but the bottom line is that this requires us to have a wrapper bash script that invokes the interpreter with the correct option. Finally, as now we are not picking up anything from the 'site', we need to vendor `setuptools` (which was still missing).
@alalazo Want to take another stab at vendoring setuptools? Alternatively, we could stop vendoring things like |
Regardless of @tgamblin What do you think about that? |
Ping @tgamblin |
Why not provide them via |
@alalazo I would like to see this in the next release. Vendoring setuptools would allow us to do a lot of fun stuff in the |
I'd have to think about whether this preserves compatibility. I don't think I definitely like the idea from #9034 (comment) - could packages presume setuptools support and fall back to manually-defined |
I definitely could, but if we're planning on not vendoring setuptools, we probably shouldn't vendor jinja2 or pytest either. I'd prefer Spack "Just Works", so I'm in favor of vendoring all 3, maybe even flake8 too while we're at it. |
@scheibelp |
If we can identify one Setuptools version that works for each version of Python currently supported by Spack (i.e., those versions which are unit-tested by the CI), then I'd be less worried. The latest one which appears to satisfy those constraints (i.e. which supports Python 2.6) on PyPI is https://pypi.org/project/setuptools/36.8.0/. If issues have been resolved for later Python versions in later versions of Setuptools, freezing to this version could be problematic. Once 2.6 support is dropped (i.e. we stop including it in our unit tests), then we could freeze to a much later version of Setuptools.
I agree. But I think there is still a difference in the importance of the
To be clear: based on the arguments I have made above in this comment, I disagree. |
Hey folks -- I took a look at this. We do not use the part of The only thing we need |
Ok I looked at If I just make |
+1 to that |
Both
jinja2
andpytest
have asetuptools
dependency, but we aren't currently vendoringsetuptools
:Currently, when I build
python
with Spack and use it to try to run the unit tests, I see the following error message:The text was updated successfully, but these errors were encountered: