I'm trying to use pants to build a trivial pex just to test it out. However, I'm running into some issues:
$ ./pants binary src/python/hworld
INFO] Detected git repository at /home/jovalko/pants on branch master
23:03:48 00:00 [main]
(To run a reporting server: ./pants server)
23:03:48 00:00 [bootstrap]
23:03:48 00:00 [setup]
23:03:48 00:00 [parse]
FAILURE:
Failed to resolve target for tool: //:scala-compiler. This target was obtained from
option scalac in scope scala-platform. You probably need to add this target to your tools
BUILD file(s), usually located in BUILD.tools in the workspace root.
Exception AddressLookupError: name 'scala_jar' is not defined
while executing BUILD file FilesystemBuildFile(/home/jovalko/pants/BUILD.tools)
Loading addresses from '' failed.
23:03:48 00:00 [complete]
FAILURE
Since it's difficult to express all the bits of my problem as a single paste, I've posted them on github (apologies for external linking).
The relevant bits are my top level BUILD
:
# Pants source code
source_root('src/python')
and the BUILD
for my hworld binary:
python_binary(name='hworld',
source='hworld.py'
)
Perhaps also BUILD.tools
but it's long and I copied it straight from pantsbuild/pants (as suggested in the docs that I start with a working version from another repo).
I've attempted various permutations (with BUILD.tools, without, various things in pants.ini
) but in every case it fails with something related to scala... which is a bit perplexing, as I'm only building python. And, running inside the pantsbuild/pants repo works fine for me.
I'll remind you that I'm brand new to pants, and it's likely I did something silly ;). Any ideas?