Having some issues with `./pants package ::`. The ...
# general
c
Having some issues with
./pants package ::
. The module in question here packages fine when I run
./pants package module::
, so it's not the
.whl
or the package itself. Looks like it's also trying to print a binary blob, most likely the ziped up
.whl
This is with pants
2.11.0
h
do you have two
python_distribution
targets in the same BUILD file perhaps?
c
not that I'm aware of, the BUILD file for this module looks like:
Copy code
python_distribution(
    name="qc_circuit_runner",
    dependencies=[
        "qc_circuit_runner/coldquanta/qc_circuit_runner",
    ],
    provides=python_artifact(
        name="coldquanta.qc_circuit_runner",
        classifiers=[
            "Programming Language :: Python :: 3.6",
            "Programming Language :: Python :: 3.7",
            "Programming Language :: Python :: 3.8",
            "Programming Language :: Python :: 3.9",
        ],
        python_requires=">=3.6.*,<4",
    ),
    # python_artifact_commands=["bdist_wheel", "--python-tag", "py36.py38"]
)
h
are you using a plugin to generate that version
2022
?
c
yeah, it sort of just fills in the
version
tag for us
👍 1
using a variant of calver
h
Cool. One thing you could try is
./pants filter --target-type=python_distribution ::
vs
./pants filter --target-type=python_distribution module::
to be confident there aren't more targets than expected
It looks like
python_distribution
does not use
output_path
like all the other package types, e.g. https://www.pantsbuild.org/docs/reference-pex_binary#codeoutput_pathcode. That means I think there is indeed some risk of multiple targets having naming conflicts Your BUILD file seems obvious tho..so I'm pretty confused
c
Is it possible the package is conflicting with itself?
Adding:
Copy code
sdist=False,
    wheel_config_settings={"--global-option": ["--python-tag", "py36.py37.py38.py39"]},
fixed it 🤷
more specifically, it seems the
sdist=False
is what fixed it
h
Huh...well that's a good find but also very confusing to me because an sdist should not be resulting in a
.whl
file being produced!
would you mind filing a bug report please?
c
I wonder if it's the glob matching being broken still? And yeah, I can file a bug report
h
still? Was there a previous bug?
c
I'll see if I can pull up the conversation
I wasn't able to nail down exactly what was going on, but it seems glob was not working at all in
2.10.1rc
or something about the inputs in that particular case was causing it to misbehave
GH issue related to above error: https://github.com/pantsbuild/pants/issues/15430