Hi folks! I have installed `black` inside my requi...
# general
l
Hi folks! I have installed
black
inside my requirements file which I'm now able to run using:
Copy code
pants run 3rdparty/python_default:reqs#black
Now I'm interested in the
pex
of this target, but running
pants package 3rdparty/python_default:reqs#black
doesn't result into a file being written into the
dist
directory. How do I generate a pex file for this target?
Currently I've setup a
pex_binary
target like:
Copy code
pex_binary(
    name = "black",
    dependencies = [
        ":reqs#black",
    ],
    # <https://github.com/psf/black/blob/main/pyproject.toml#L87>
    entry_point = "black:patched_main",
)
Which works, but it's a bit unfortunate as I have to search for specify the entry_point myself now. It feels like all of this information is already available in Pants and can be made easier 🤔
c
I think this has come up a few times, please free to open an issue https://github.com/pantsbuild/pants/issues Do you have an inclination of how this might work for a package that provides multiple entry points?
l
For example for the package
pip-tools
which exposes
pip-compile
and
pip-sync
I'd just expose both targets.
Happy to file an issue!