I thought I’d try out the docker support on the `e...
# plugins
c
I thought I’d try out the docker support on the
example-python
repo, and manage to run a local built version of
pants
. However, when I try to load in the experimental docker package, it fails…
Copy code
# ~/src/github/kaos/pants-example-python (main *)
$ ../pants/dist/src.python.pants.bin/pants.pex --version
10:58:20.60 [INFO] Initializing scheduler...
10:58:21.20 [INFO] Scheduler initialized.
2.7.0.dev1
Adding
"pants.backend.experimental.docker",
to
pants.toml
in example repo.. and boom:
Copy code
ModuleNotFoundError: No module named 'pants.backend.experimental.docker'
11:01:09.51 [ERROR] Failed to load the pants.backend.experimental.docker.register backend: ModuleNotFoundError("No module named 'pants.backend.experimental.docker'")
are there some pants command flags I’m missing, perhaps. haven’t looked too closely on the bootstrap script..
Or, the experimental lib is not in the pex at all… hmmm
h
There is an explicit dependency in src/python/pants/init/BUILD ?
💯 1
🎯 1
backend dependencies aren't currently inferred, since they're loaded dynamically by name at runtime
c
Will take a look later tonight..
w
ah, yea: the PEX probably doesn’t contain the sources.
but, note also that you can use the
pants_from_sources
script to skip the PEX building step
💯 1
./pants_from_sources --version
in
example-python
🎯 1
❤️ 1
👀 1
c
Dang I missed that script.. works like a charm, thanks @witty-crayon-22786
w
but yea, what Benjy said about ensuring that the experimental backend is linked into the
pantsbuild.pants
distribution/binary is also important
the “from sources” script uses a much more primitive approach.
c
Aahh. right. Yeah, will add the missing modules in the init BUILD file too, then…
and with that, the PEX works too, sweet. Thanks! 🙂
🤘 2