github.com/tiagovtristao/plz@v13.4.0+incompatible/tools/please_pex/BUILD (about) 1 filegroup( 2 name = "pex_data", 3 srcs = [ 4 "behave.py", 5 "pex_main.py", 6 "pex_run.py", 7 "pytest.py", 8 "test_main.py", 9 "unittest.py", 10 ], 11 visibility = ["//tools/please_pex/pex:all"], 12 ) 13 14 go_binary( 15 name = "pex_main", 16 srcs = ["pex_main.go"], 17 deps = [ 18 "//src/cli", 19 "//third_party/go:logging", 20 "//tools/please_pex/pex", 21 ], 22 ) 23 24 # Combine all the Python dependencies into one zipfile and concatenate them 25 # onto the binary. 26 genrule( 27 name = "please_pex", 28 srcs = [ 29 ":pex_main", 30 "//third_party/python:six", 31 "//third_party/python:xmlrunner", 32 "//third_party/python:coverage", 33 "//third_party/python:pytest", 34 "//third_party/python:py", 35 "//third_party/python:pluggy", 36 "//third_party/python:attrs", 37 "//third_party/python:funcsigs", 38 "//third_party/python:pkg_resources", 39 "//third_party/python:behave", 40 "//third_party/python:parse", 41 "//third_party/python:parse_type", 42 "//third_party/python:traceback2", 43 "//third_party/python:enum34", 44 "//third_party/python:win_unicode_console", 45 "//third_party/python:colorama", 46 ], 47 outs = ["please_pex"], 48 binary = True, 49 cmd = [ 50 # Have to make sure these exist. 51 "touch third_party/__init__.py third_party/python/__init__.py", 52 "touch tools/__init__.py tools/please_pex/__init__.py", 53 "mv third_party/python .bootstrap", 54 # A little cleanup. 55 "rm -rf third_party .bootstrap/xmlrunner/extra .bootstrap/coverage/htmlfiles .bootstrap/.*.pex.zip", 56 "$TOOL z -d -i .bootstrap -o $OUTS --preamble_file $(location :pex_main)", 57 ], 58 tools = ["//tools/jarcat"], 59 visibility = ["PUBLIC"], 60 ) 61 62 python_test( 63 name = "pex_test", 64 srcs = ["pex_test.py"], 65 ) 66 67 python_test( 68 name = "custom_interpreter_test", 69 srcs = ["custom_interpreter_test.py"], 70 interpreter = "/usr/bin/pypy", 71 labels = ["manual"], 72 ) 73 74 python_test( 75 name = "pex_import_test", 76 srcs = ["pex_import_test.py"], 77 deps = [ 78 "//third_party/python:dateutil", 79 "//third_party/python:requests", 80 ], 81 )