forked from RediSearch/RediSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
system-setup.py
executable file
·70 lines (51 loc) · 2.17 KB
/
system-setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env python2
import sys
import os
import argparse
ROOT = HERE = os.path.abspath(os.path.dirname(__file__))
READIES = os.path.join(ROOT, "deps/readies")
sys.path.insert(0, READIES)
import paella
#----------------------------------------------------------------------------------------------
class RediSearchSetup(paella.Setup):
def __init__(self, nop=False):
paella.Setup.__init__(self, nop)
def common_first(self):
self.install_downloaders()
self.pip_install("wheel")
self.pip_install("setuptools --upgrade")
self.run("%s/bin/enable-utf8" % READIES)
self.install("git rsync")
def debian_compat(self):
self.install("libatomic1")
self.run("%s/bin/getgcc" % READIES)
def redhat_compat(self):
self.install("redhat-lsb-core")
self.install("libatomic")
self.run("%s/bin/getgcc --modern" % READIES)
# fix setuptools
self.pip_install("-IU --force-reinstall setuptools")
def archlinux(self):
self.install("gcc-libs")
def fedora(self):
self.install("libatomic")
self.run("%s/bin/getgcc" % READIES)
def macos(self):
self.install_gnu_utils()
self.install("pkg-config")
# for now depending on redis from brew, it's version6 with TLS.
self.run("{PYTHON} {READIES}/bin/getredis -v 6 --force".format(PYTHON=self.python, READIES=READIES))
def common_last(self):
self.run("{PYTHON} {READIES}/bin/getcmake".format(PYTHON=self.python, READIES=READIES))
self.run("{PYTHON} {READIES}/bin/getrmpytools --reinstall".format(PYTHON=self.python, READIES=READIES))
if self.dist != "arch":
self.install("lcov")
else:
self.install("lcov-git", aur=True)
self.pip_install("pudb awscli")
self.pip_install("-r %s/tests/pytests/requirements.txt" % ROOT)
#----------------------------------------------------------------------------------------------
parser = argparse.ArgumentParser(description='Set up system for build.')
parser.add_argument('-n', '--nop', action="store_true", help='no operation')
args = parser.parse_args()
RediSearchSetup(nop = args.nop).setup()