Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 1 | python_binary( |
| 2 | name = 'download_file', |
| 3 | main = 'download_file.py', |
| 4 | deps = [':util'], |
| 5 | visibility = ['PUBLIC'], |
| 6 | ) |
| 7 | |
| 8 | python_binary( |
Brian O'Connor | 1f16598 | 2016-04-06 21:36:09 -0700 | [diff] [blame] | 9 | name = 'onos-app-writer', |
| 10 | main = 'onos_app.py', |
| 11 | deps = [], |
| 12 | visibility = ['PUBLIC'], |
| 13 | ) |
| 14 | |
| 15 | python_binary( |
| 16 | name = 'onos-app-oar', |
| 17 | main = 'onos_oar.py', |
| 18 | deps = [], |
| 19 | visibility = ['PUBLIC'], |
| 20 | ) |
| 21 | |
Brian O'Connor | 0167bd4 | 2016-04-29 17:09:10 -0700 | [diff] [blame] | 22 | python_binary( |
| 23 | name = 'onos-stage', |
| 24 | main = 'onos_stage.py', |
| 25 | deps = [], |
| 26 | visibility = ['PUBLIC'], |
| 27 | ) |
| 28 | |
| 29 | python_binary( |
| 30 | name = 'onos-feature', |
| 31 | main = 'onos_feature.py', |
| 32 | deps = [], |
| 33 | visibility = ['PUBLIC'], |
| 34 | ) |
Brian O'Connor | 1f16598 | 2016-04-06 21:36:09 -0700 | [diff] [blame] | 35 | |
| 36 | python_binary( |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 37 | name = 'pack_war', |
| 38 | main = 'pack_war.py', |
| 39 | deps = [':util'], |
| 40 | visibility = ['PUBLIC'], |
| 41 | ) |
| 42 | |
| 43 | python_library( |
| 44 | name = 'util', |
| 45 | srcs = [ |
| 46 | 'util.py', |
| 47 | '__init__.py' |
| 48 | ], |
| 49 | visibility = ['PUBLIC'], |
| 50 | ) |
| 51 | |
| 52 | def shquote(s): |
| 53 | return s.replace("'", "'\\''") |
| 54 | |
| 55 | def os_path(): |
| 56 | from os import environ |
| 57 | return environ.get('PATH') |
| 58 | |
| 59 | genrule( |
| 60 | name = 'buck', |
| 61 | cmd = 'echo buck=`which buck`>$OUT;' + |
| 62 | ("echo PATH=\''%s'\' >>$OUT;" % shquote(os_path())), |
| 63 | out = 'buck.properties', |
| 64 | visibility = ['PUBLIC'], |
| 65 | ) |
| 66 | |