i have build rules in a file for a pex and a wheel...
# general
g
i have build rules in a file for a pex and a wheel. when i build both with
./pants package ponder/::
, the pex goes into a folder within
dist
at
dist/ponder/ponder_bin.pex
. the wheel goes straight into the top level of
dist
at
dist/ponder-0.0.3-py3-none-any.whl
. is there any way to control the location of the output wheel? i want the wheel to go in
dist/ponder
too. here is the `ponder/BUILD`:
Copy code
# resource(name="pyproject", source="pyproject.toml")

pex_binary(
    name="ponder_bin",
    entry_point="__main__.py",
)

python_distribution(
    name="ponder_wheel",
    dependencies=["//:something_at_root"],
    provides=python_artifact(
        name="ponder",
        version="0.0.3",
    ),
    sdist=False
)

python_sources()
c
Hi! I was going to say “yes, you set the
output_path
field”, but,
python_distribution
doesn’t seem to have one! But
pex_binary
does: https://www.pantsbuild.org/docs/reference-pex_binary#codeoutput_pathcode Please open a ticket for the missing output_path on python_distribution if this is something you’d like to see added 🙂
h
Yeah, the output paths in
dist/
are a little haphazard, the only hard requirement is that they not conflict across different targets, and since the wheel name is already expected to be globally unique, I guess we figured that was sufficient
g