https://pantsbuild.org/ logo
#general
Title
# general
g

glamorous-accountant-97217

11/18/2022, 7:04 AM
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

curved-television-6568

11/18/2022, 12:43 PM
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

happy-kitchen-89482

11/18/2022, 4:25 PM
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

glamorous-accountant-97217

11/18/2022, 10:53 PM
3 Views