Build conda based kits for SLC5
Adds a special platform called linux-64@glibc-2.5
which contains a Python 3.6 interpreter which has support for CentOS 5. It feels cleaner to base these kits on the glibc version rather than the OS.
I was then going to suggest using a script like this for detecting the host OS:
#!/bin/bash
###############################################################################
# (c) Copyright 2018-2019 CERN #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
set -euo pipefail
IFS=$'\n\t'
# Known platforms from: https://conda-static.anaconda.org/conda-forge/index.html
# linux-32
# linux-64
# linux-aarch64
# linux-ppc64le
# osx-64
if [ -z "${force_host_os:-}" ] ; then
_os=$(uname -s)
case $_os in
'Linux')
_os='linux'
;;
'Darwin')
_os='osx'
;;
*) ;;
esac
_arch=$(uname -m)
case $_arch in
'x86_64')
_arch='64'
;;
'ppc64')
_arch='ppc64le'
;;
'aarch64')
_arch='aarch64'
;;
'i686')
_arch='32'
;;
*) ;;
esac
host_os="${_os}-${_arch}"
# Fix up for systems with really old glibc versions
if [[ "${host_os}" == "linux-64" ]]; then
_libc_type=$(getconf GNU_LIBC_VERSION | cut -d " " -f 1)
_libc_major=$(getconf GNU_LIBC_VERSION | cut -d " " -f 2 | cut -d '.' -f 1)
_libc_minor=$(getconf GNU_LIBC_VERSION | cut -d " " -f 2 | cut -d '.' -f 2)
if [ "${_libc_type}" == "glibc" ] && [ "${_libc_major}" -eq "2" ]; then
if [ "${_libc_minor}" -lt "12" ]; then
# CentOS 5
host_os="linux-64@glibc-2.5"
fi
fi
fi
else
(>&2 echo "warning: overriding host os detection (using ${force_host_os})")
_os=${force_host_os}
fi
echo "${host_os}"
Edited by Chris Burr