Mercurial > hg > config
comparison python/install_config.py @ 645:753a5358535f
correct syntax errors; now works again
| author | Jeff Hammel <k0scist@gmail.com> |
|---|---|
| date | Tue, 11 Mar 2014 21:19:11 -0700 |
| parents | fd50f457185c |
| children | e56610c5ece2 |
comparison
equal
deleted
inserted
replaced
| 644:b4dc72b7c5c3 | 645:753a5358535f |
|---|---|
| 128 ['ln', '-s', | 128 ['ln', '-s', |
| 129 os.path.join(HOME, 'virtualenv/virtualenv.py'), | 129 os.path.join(HOME, 'virtualenv/virtualenv.py'), |
| 130 os.path.join(HOME, 'bin', 'virtualenv.py')] | 130 os.path.join(HOME, 'bin', 'virtualenv.py')] |
| 131 ] | 131 ] |
| 132 | 132 |
| 133 class InstallKWare(In): | 133 class InstallKWare(Step): |
| 134 """install k0s.ware""" | 134 """install k0s.ware""" |
| 135 # TODO | 135 # TODO |
| 136 # from legacy | 136 # from legacy |
| 137 # # install some python | 137 # # install some python |
| 138 # install_develop('smartopen') | 138 # install_develop('smartopen') |
| 168 "xclip", | 168 "xclip", |
| 169 ] | 169 ] |
| 170 | 170 |
| 171 def __call__(self): | 171 def __call__(self): |
| 172 # TODO: actually install this shit | 172 # TODO: actually install this shit |
| 173 print "Ensure the following packages are installed:" | 173 print ("Ensure the following packages are installed:") |
| 174 print "sudo apt-get install %s" % ' '.join(self.PACKAGES) | 174 print ("sudo apt-get install %s" % ' '.join(self.PACKAGES)) |
| 175 | |
| 176 | |
| 177 ### legacy -v- | |
| 178 | |
| 179 def legacy(): | |
| 180 """legacy : TO DEPRECATE!""" | |
| 181 | |
| 182 # do git stuff | |
| 183 git = which('git') | |
| 184 if git: | |
| 185 | |
| 186 else: | |
| 187 print "git not installed" | |
| 188 | 175 |
| 189 | 176 |
| 190 ### CLI | 177 ### CLI |
| 191 | 178 |
| 192 def main(args=sys.argv[1:]): | 179 def main(args=sys.argv[1:]): |
| 223 for step in steps: | 210 for step in steps: |
| 224 print(step.name()) | 211 print(step.name()) |
| 225 parser.exit() | 212 parser.exit() |
| 226 | 213 |
| 227 if options.all: | 214 if options.all: |
| 228 # list available steps | 215 raise NotImplementedError("TODO") |
| 229 for sorted([]): | |
| 230 raise NotImplementedError("TODO") | |
| 231 | 216 |
| 232 # execute steps | 217 # execute steps |
| 233 for step in steps: | 218 for step in steps: |
| 234 instance = step() | 219 instance = step() |
| 235 instance() | 220 instance() |
