On Sun, 31 Jul 2016, ~Stack~ wrote:

I have the exact same problem. Don't try to replace 2.6.6. It broke ALL
KINDS of things including RPM when I tried it...did not go well at all
(but a good learning experience! :-).

Here are three solutions:

1) Software Collections: https://www.softwarecollections.org/en/
Upside, A certain favored upstream vendor backs a lot of these packages
(just no support). Downside, they run in a special environment which can
be tricky depending on the application. It basically runs in a subshell
and that confuses my users at least....

                         Same with SCL. We use it elsewhere too, but
anything that the users have to interact with, we found they get
frustrated because of the weird subshell-environment it uses.

If your users are used to environment modules, the SCL pythons
can be made to work with those rather than SCL sub-shells
- here is our python27 module:

#%Module2013
#
# $Id: python27,v 1.2 2016/07/31 19:54:12 werdna Exp $
#

conflict python33

if [ file isfile /opt/rh/python27/root/usr/bin/python ] {
        module-whatis "Loads python27"

        set pythonroot /opt/rh/python27/root

        prepend-path  PATH $pythonroot/usr/bin
        prepend-path  LD_LIBRARY_PATH $pythonroot/usr/lib64
        prepend-path  MANPATH $pythonroot/usr/share/man
        # For systemtap
        prepend-path  XDG_DATA_DIRS $pythonroot/usr/share
        # For pkg-config
        prepend-path  PKG_CONFIG_PATH $pythonroot/usr/lib64/pkgconfig
} else {
    module-whatis "Python 27 not installed on this machine"
    set helpmsg "Python 27 not installed on this machine"
    if [ expr [ module-info mode load ] || [ module-info mode display ] ] {
        # bring in new version
        puts stderr "Python 27 not installed on [uname nodename]"
    }
}


--
Andrew C Aitchison

Reply via email to