Skip to content

Instantly share code, notes, and snippets.

@lexinator
Last active November 16, 2016 23:15
Show Gist options
  • Save lexinator/b4b6846010c4f53a1710ed213add2c7d to your computer and use it in GitHub Desktop.
Save lexinator/b4b6846010c4f53a1710ed213add2c7d to your computer and use it in GitHub Desktop.
linux%% cat pex/BUILD
import os
python_binary(
name='rio-sidecar',
entry_point='sidecar.cli:cli',
platforms=[
'linux-x86_64',
'macosx-10.12-x86_64',
],
dependencies = [
':sidecar',
],
)
python_library(
name = '_sidecar',
sources = rglobs('sidecar/*.py'),
resources = rglobs('sidecar/schema/*.yml', 'sidecar/version'),
dependencies = [
'pex/third_party/python:click',
'pex/third_party/python:ruamel.yaml',
'pex/third_party/python:pykwalify',
],
)
python_library(
name = 'sidecar',
provides = setup_py(
name='sidecar',
version = open(os.path.join(get_buildroot(), 'version')).read().strip(),
description='',
license = '',
),
dependencies = [
':_sidecar',
],
)
linux% ./pants -ldebug binary pex:rio-sidecar
sys:1: DeprecationWarning: DEPRECATED: option 'default_backend_packages' in global scope will be removed in version 1.3.0.
All backends must be specified using the backend_packages option. That option has the same defaults as this one, and you can appendand filter those using +[...] and -[...] syntax, as described here: http://www.pantsbuild.org/options.html#list-options.
DEBUG] Target alias resources has already been registered. Overwriting!
DEBUG] ProjectTree ignore_patterns: ['.*', '/dist/']
DEBUG] Parsing BUILD file BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)).
DEBUG] Adding TargetAddressable(target_type=<class 'pants.backend.python.targets.python_binary.PythonBinary'>, name=rio-sidecar, **kwargs=...) to the BuildFileParser address map with BuildFileAddress(BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), rio-sidecar)
DEBUG] Adding TargetAddressable(target_type=<class 'pants.backend.python.targets.python_library.PythonLibrary'>, name=_sidecar, **kwargs=...) to the BuildFileParser address map with BuildFileAddress(BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), _sidecar)
DEBUG] Adding TargetAddressable(target_type=<class 'pants.backend.python.targets.python_library.PythonLibrary'>, name=sidecar, **kwargs=...) to the BuildFileParser address map with BuildFileAddress(BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), sidecar)
DEBUG] BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)) produced the following Addressables:
DEBUG] * BuildFileAddress(BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), rio-sidecar): TargetAddressable(target_type=<class 'pants.backend.python.targets.python_binary.PythonBinary'>, name=rio-sidecar, **kwargs=...)
DEBUG] * BuildFileAddress(BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), sidecar): TargetAddressable(target_type=<class 'pants.backend.python.targets.python_library.PythonLibrary'>, name=sidecar, **kwargs=...)
DEBUG] * BuildFileAddress(BuildFile(pex/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), _sidecar): TargetAddressable(target_type=<class 'pants.backend.python.targets.python_library.PythonLibrary'>, name=_sidecar, **kwargs=...)
DEBUG] excludes:
DEBUG] Targets after excludes: pex:rio-sidecar
DEBUG] Excluded 0 targets.
DEBUG] Parsing BUILD file BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)).
DEBUG] Adding TargetAddressable(target_type=<class 'pants.backend.python.targets.python_requirement_library.PythonRequirementLibrary'>, name=click, **kwargs=...) to the BuildFileParser address map with BuildFileAddress(BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), click)
DEBUG] Adding TargetAddressable(target_type=<class 'pants.backend.python.targets.python_requirement_library.PythonRequirementLibrary'>, name=ruamel.yaml, **kwargs=...) to the BuildFileParser address map with BuildFileAddress(BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), ruamel.yaml)
DEBUG] Adding TargetAddressable(target_type=<class 'pants.backend.python.targets.python_requirement_library.PythonRequirementLibrary'>, name=pykwalify, **kwargs=...) to the BuildFileParser address map with BuildFileAddress(BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), pykwalify)
DEBUG] BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)) produced the following Addressables:
DEBUG] * BuildFileAddress(BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), ruamel.yaml): TargetAddressable(target_type=<class 'pants.backend.python.targets.python_requirement_library.PythonRequirementLibrary'>, name=ruamel.yaml, **kwargs=...)
DEBUG] * BuildFileAddress(BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), click): TargetAddressable(target_type=<class 'pants.backend.python.targets.python_requirement_library.PythonRequirementLibrary'>, name=click, **kwargs=...)
DEBUG] * BuildFileAddress(BuildFile(pex/third_party/python/BUILD, FileSystemProjectTree(/home/lexinator/src/rio-sidecar)), pykwalify): TargetAddressable(target_type=<class 'pants.backend.python.targets.python_requirement_library.PythonRequirementLibrary'>, name=pykwalify, **kwargs=...)
DEBUG] Executing: git --git-dir=/home/lexinator/src/rio-sidecar/.git --work-tree=/home/lexinator/src/rio-sidecar rev-parse --abbrev-ref HEAD
DEBUG] Detected git repository at /home/lexinator/src/rio-sidecar on branch package
DEBUG] Executing: git --git-dir=/home/lexinator/src/rio-sidecar/.git --work-tree=/home/lexinator/src/rio-sidecar rev-parse HEAD
DEBUG] Executing: git --git-dir=/home/lexinator/src/rio-sidecar/.git --work-tree=/home/lexinator/src/rio-sidecar rev-parse --abbrev-ref HEAD
15:08:27 00:00 [main]
(To run a reporting server: ./pants server)
15:08:27 00:00 [setup]
15:08:27 00:00 [parse]
Executing tasks in goals: binary
15:08:27 00:00 [binary]
15:08:27 00:00 [binary-prep-command]
15:08:27 00:00 [python-binary-create]
created .pants.d/binary/python-binary-create/0550b754d96b/pex.rio-sidecar/current/rio-sidecar.pex
created pex copy dist/rio-sidecar.pex
15:08:27 00:00 [complete]
SUCCESS
linux% unzip -l dist/rio-sidecar.pex| grep osx | wc -l
0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment