55import argparse
66
77HERE = os .path .abspath (os .path .dirname (__file__ ))
8+ READIES = os .path .join (HERE , "readies" )
89ROOT = os .path .abspath (os .path .join (HERE , ".." ))
9- sys .path .insert (0 , os . path . join ( HERE , "readies" ) )
10+ sys .path .insert (0 , READIES )
1011import paella
1112
1213#----------------------------------------------------------------------------------------------
@@ -19,9 +20,6 @@ def common_first(self):
1920 self .install_downloaders ()
2021 self .setup_pip ()
2122 self .pip_install ("wheel virtualenv" )
22- # if self.osnick == 'xenial':
23- # self.pip_install("setuptools --upgrade")
24- # self.pip_install("-IU --force-reinstall setuptools")
2523
2624 if self .os == 'linux' :
2725 self .install ("ca-certificates" )
@@ -32,17 +30,6 @@ def debian_compat(self):
3230 self .install ("gawk" )
3331 self .install ("build-essential" )
3432 self .install ("libssl-dev" )
35- self .run ("""
36- apt remove -y --purge --auto-remove cmake
37- version=3.19
38- build=0
39- mkdir ~/temp
40- cd ~/temp
41- wget https://cmake.org/files/v$version/cmake-$version.$build-Linux-x86_64.sh
42- mkdir /opt/cmake
43- sh cmake-$version.$build-Linux-x86_64.sh --prefix=/opt/cmake --skip-license
44- ln -s /opt/cmake/bin/cmake /usr/local/bin/cmake
45- """ )
4633 self .install ("clang-format" )
4734 self .install ("python3-regex" )
4835 self .install ("python3-psutil python3-networkx python3-numpy" ) # python3-skimage
@@ -53,22 +40,11 @@ def redhat_compat(self):
5340 self .run ("%s/readies/bin/enable-utf8" % HERE )
5441
5542 self .group_install ("'Development Tools'" )
56-
57- self .install ("centos-release-scl" )
58- self .install ("devtoolset-8" )
59- self .run ("cp /opt/rh/devtoolset-8/enable /etc/profile.d/scl-devtoolset-8.sh" )
60-
43+ self .run ("%s/bin/getgcc --modern" % READIES )
6144 self .install ("llvm-toolset-7" )
6245
63- paella .mkdir_p ("%s/profile.d" % ROOT )
64- self .run ("cp /opt/rh/devtoolset-8/enable %s/profile.d/scl-devtoolset-8.sh" % ROOT )
65-
66- self .run ("""
67- dir=$(mktemp -d /tmp/tar.XXXXXX)
68- (cd $dir; wget -q -O tar.tgz http://redismodules.s3.amazonaws.com/gnu/gnu-tar-1.32-x64-centos7.tgz; tar -xzf tar.tgz -C /; )
69- rm -rf $dir
70- """ )
71-
46+ if self .arch == 'x64' :
47+ self .install_linux_gnu_tar ()
7248
7349 if not self .dist == "amzn" :
7450 self .install ("epel-release" )
@@ -79,30 +55,23 @@ def redhat_compat(self):
7955 self .install ("python3-devel" )
8056 self .pip_install ("psutil" )
8157
82- self .install ("cmake3" )
83- self .run ("ln -sf `command -v cmake3` /usr/local/bin/cmake" )
84-
8558 self .install_git_lfs_on_linux ()
8659
8760 def fedora (self ):
8861 self .group_install ("'Development Tools'" )
89- self .install ("cmake" )
90- self .run ("ln -sf `command -v cmake3` /usr/local/bin/cmake" )
9162 self .install ("python3 python3-psutil python3-networkx" )
9263 self .install ("clang" )
9364 self .install_git_lfs_on_linux ()
9465
9566 def macos (self ):
96- if sh ('xcode-select -p' ) == '' :
97- fatal ("Xcode tools are not installed. Please run xcode-select --install." )
98-
9967 self .install_gnu_utils ()
100- self .install ("cmake" )
10168 self .install ("git-lfs" )
10269 self .install ("redis" )
10370 self .install ("clang-format" )
10471
10572 def common_last (self ):
73+ self .run ("%s/bin/getcmake" % READIES )
74+
10675 self .run ("python3 -m pip uninstall -y ramp-packer RLTest || true" )
10776 # redis-py-cluster should be installed from git due to redis-py dependency
10877 self .pip_install ("--no-cache-dir git+https://github.com/Grokzen/redis-py-cluster.git@master" )
0 commit comments