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 | |
| 22 | |
| 23 | python_binary( |
Ray Milkey | f80bbb2 | 2016-03-11 10:16:22 -0800 | [diff] [blame] | 24 | name = 'pack_war', |
| 25 | main = 'pack_war.py', |
| 26 | deps = [':util'], |
| 27 | visibility = ['PUBLIC'], |
| 28 | ) |
| 29 | |
| 30 | python_library( |
| 31 | name = 'util', |
| 32 | srcs = [ |
| 33 | 'util.py', |
| 34 | '__init__.py' |
| 35 | ], |
| 36 | visibility = ['PUBLIC'], |
| 37 | ) |
| 38 | |
| 39 | def shquote(s): |
| 40 | return s.replace("'", "'\\''") |
| 41 | |
| 42 | def os_path(): |
| 43 | from os import environ |
| 44 | return environ.get('PATH') |
| 45 | |
| 46 | genrule( |
| 47 | name = 'buck', |
| 48 | cmd = 'echo buck=`which buck`>$OUT;' + |
| 49 | ("echo PATH=\''%s'\' >>$OUT;" % shquote(os_path())), |
| 50 | out = 'buck.properties', |
| 51 | visibility = ['PUBLIC'], |
| 52 | ) |
| 53 | |