acb9af332b
Since this Buck's commit 59759043f66de17140b423a7f11a2d8827b4cbbf the whole unflattened subtree is used. Change-Id: I4ec930a452d4867add3f5dd46430d3184c2a7277
57 lines
947 B
Python
57 lines
947 B
Python
python_binary(
|
|
name = 'download_file',
|
|
main = 'download_file.py',
|
|
deps = [':util'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_binary(
|
|
name = 'pack_war',
|
|
main = 'pack_war.py',
|
|
deps = [':util'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_library(
|
|
name = 'util',
|
|
srcs = [
|
|
'util.py',
|
|
'__init__.py'
|
|
],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
python_library(
|
|
name = 'util_test',
|
|
srcs = ['util_test.py'],
|
|
deps = [':util'],
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
def shquote(s):
|
|
return s.replace("'", "'\\''")
|
|
|
|
def os_path():
|
|
from os import environ
|
|
return environ.get('PATH')
|
|
|
|
genrule(
|
|
name = 'buck.properties',
|
|
cmd = 'echo buck=`which buck`>$OUT;' +
|
|
("echo PATH=\''%s'\' >>$OUT;" % shquote(os_path())),
|
|
deps = [],
|
|
out = 'buck.properties',
|
|
visibility = ['PUBLIC'],
|
|
)
|
|
|
|
java_test(
|
|
name = 'python_tests',
|
|
srcs = glob(['PythonTestCaller.java']),
|
|
deps = [
|
|
'//lib:guava',
|
|
'//lib:junit',
|
|
':util',
|
|
':util_test',
|
|
],
|
|
)
|