forked from pycontribs/tendo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprepare
executable file
·29 lines (24 loc) · 1.02 KB
/
prepare
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
#!/usr/bin/env python
import os
import sys
import logging
import platform
"""
This script will install the requirements needed for developing tendo.
"""
if __name__ == "__main__":
log = logging.getLogger()
# now we'll detect which python interpretors we have on this machine and run the tests for all of them
known_pys = { 'python2.5':'py25', 'python2.6':'py26', 'python2.7':'py27' } # ,'python3':'py3', 'python3.2':'py32', 'python4':'py4'}
detected_pys = set()
for known_py in known_pys:
if os.system("which %s >/dev/null" % known_py) == 0:
detected_pys.add(known_pys[known_py])
if os.system("pip --help >/dev/null 2>&1") != 0:
print("Dude, you are hopeless, you dont even have pip, please intall it, ususaly with '[apt-get|yum|brew] install pip'")
elif os.system("pip install --user -r requirements.txt") == 0:
pass
else:
print "All requirements are available."
sys.exit(0)
sys.exit(2)