Hi pants people! I have 2 questions--one easy and ...
# general
c
Hi pants people! I have 2 questions--one easy and another not-so-much. 1) Is there an off-the-shelf way to publish
python_library
targets to PyPI or Gemfury (PyPI compatible)? It seems like the
publish
goal is strictly jvm-related. I looked into the
setup-py
goal/task, but I didn’t see a reference to publishing besides this TODO comment: https://github.com/pantsbuild/pants/blob/master/src/python/pants/backend/python/tasks/setup_py.py#L240 2) As a quick workaround, I attempted to add the
python_library
as a dependency to a docker plugin. My goal was to copy the whl file into the container and pip install it manually. The problem here is that I’m unsure of the product_type to request to the round_manager? My best guess was
local_wheels
from
build_local_python_distributions
, but I’m not having any luck getting it from
context.products
.
context.products.get('local_wheels')
returns empty, and I don’t see a reference to the library’s target name when dumping the entire
context.products
object--I do see another target in there, so I assumed it should be in there. Just for clarity, I have the following setup, shortened for brevity:
Copy code
python_library(
  name='plugins_lib',
  provides=setup_py(
    name='plugins',
  )
)
python_app(
  name='plugins',
)

docker_python_app_image(
  name='plugins_image',
  dependencies=[
    ':plugins',
    ':plugins_lib',
  ],
)
Is the problem that the
plugins_lib
dep on
plugins_image
doesn’t refer to the
setup_py
directly? And that’s why it doesn’t show in the product map?