github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/please_pex/BUILD (about)

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