On 3 October 2016 at 23:36, Tomas Orsava <torsava(a)redhat.com> wrote:
On 09/27/2016 08:43 AM, Nick Coghlan wrote:
>> P.P.S. I realize rh-python34 is available on RHSCL, but it didn't seem to
>> support "python3" in scripts...
> Script shebang lines can be supported via SCLs, but they need to run a
> wrapper script that implicitly enables the SCL, rather than just being
> a symlink to the SCL's Python executable. I don't recall the exact
> incantation myself, but hopefully someone else will be able to chime
> in with that.
Right now you need to create and use a wrapper script that contains:
/usr/bin/scl enable rh-python34 -- python3 "$@"
However, when this BZ  gets into RHEL 7.4 (there's also talk of 7.3
Z-stream), you'll be able to enable the collection right in the shebang like
#!/usr/bin/scl enable rh-python34 -- python3
Nice. Would that come with a corresponding update to the pip and
setuptools versions in RHSCL such that their wrapper script generators
did the right thing?
I bring that up, as one of the other challenges with the way SCLs
currently work is that the upstream convention of copying
"sys.executable" into the shebang to generate a script that runs in
the current Python doesn't work as expected.
Nick Coghlan | ncoghlan(a)gmail.com | Brisbane, Australia