我试图用裤子来构建一个微不足道的pex只是为了测试它。但是,我遇到了一些问题:构建python裤子失败时发生scala相关错误
$ ./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
因为它是难以表达我的问题作为一个粘贴的所有位,我已为他们on github(外部链接道歉)。
相关位是我的最高水平BUILD
:
# Pants source code
source_root('src/python')
和BUILD
我hworld二进制:
python_binary(name='hworld',
source='hworld.py'
)
或许也BUILD.tools
但它的长,我直接复制它从pantsbuild /裤(正如文档中所建议的,我从另一个回购的工作版本开始)。
我试过各种组合(与BUILD.tools,没有,各种东西在),但在任何情况下,它与有关scala的东西失败......这有点令人困惑,因为我只是建立python 。而且,在pantsbuild /裤子回购里面运行对我来说工作得很好。
我会提醒你我是全新的裤子,可能我做了一件傻事;)。有任何想法吗?
我想我们已经在1.0版本的裤子中解决了这个问题,因为根本不需要BUILD.tools。安装过程已精简,请参阅http://www.pantsbuild.org/install.html。 – ericzundel