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

calm-ambulance-65371

05/12/2022, 3:13 PM
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

hundreds-father-404

05/12/2022, 3:19 PM
do you have two
python_distribution
targets in the same BUILD file perhaps?
c

calm-ambulance-65371

05/12/2022, 3:19 PM
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

hundreds-father-404

05/12/2022, 3:21 PM
are you using a plugin to generate that version
2022
?
c

calm-ambulance-65371

05/12/2022, 3:27 PM
yeah, it sort of just fills in the
version
tag for us
👍 1
using a variant of calver
h

hundreds-father-404

05/12/2022, 3:31 PM
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

calm-ambulance-65371

05/12/2022, 4:51 PM
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

hundreds-father-404

05/12/2022, 4:59 PM
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

calm-ambulance-65371

05/12/2022, 5:59 PM
I wonder if it's the glob matching being broken still? And yeah, I can file a bug report
h

hundreds-father-404

05/12/2022, 6:07 PM
still? Was there a previous bug?
c

calm-ambulance-65371

05/12/2022, 6:22 PM
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
6 Views