is there a way to specify additional packages to i...
# general
d
is there a way to specify additional packages to install for a pants plugin? I'm loading it through backend_packages but need to get it to install some things with pip before it can run the plugin
h
This is unintuitive, but you add them in the
plugins
option in
pants.ini
, under
[GLOBAL]
E.g.,
Copy code
plugins: [
    'pantsbuild.pants.contrib.codeanalysis==%(pants_version)s',
    'pantsbuild.pants.contrib.go==%(pants_version)s',
    'pantsbuild.pants.contrib.python.checks==%(pants_version)s',
    'protobuf==3.2.0',
    'setuptools==30.0.0',
    'leveldb==0.20',
    'boto3==1.7.7'
  ]
The first three are published plugins we’re consuming, the last 4 are requirements for our internal plugin, which itself is not listed here because we’re consuming that from inside the repo… So it’s a bit of a hack, but it works fine.
We reference the internal plugin thusly:
Copy code
pythonpath: [
    '%(buildroot)s/src/python',
  ]

backend_packages: +['toolchain.pants']