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

dry-match-62274

03/25/2020, 6:46 AM
Hi guys, we had some issue when try to add
confluent_kafka 1.3.0
as our python requirements and build our binary.
Copy code
./pants binary src/python/::
......

Exception caught: (pex.vendor._vendored.wheel.wheel.install.BadWheelFile)
......
Exception message: No expected hash for file 'confluent_kafka/.dylibs/monitoring-interceptor.dylib'
we tested package by installing it using pip / pipenv and works fine. is there any workaround to avoid the build being blocked here?
h

hundreds-father-404

03/25/2020, 7:09 AM
Hi, which version of Pants are you using?
d

dry-match-62274

03/25/2020, 7:13 AM
Copy code
1.22.0
h

hundreds-father-404

03/25/2020, 7:36 AM
Ah, Pants 1.22.0 uses the 1.6 series of Pex, which had its own resolver. Pex 2.x meanwhile uses Pip for resolution, so works around many bugs like this. The first Pants release with Pex 2.x is 1.26.0rc1. You could either try upgrading directly to that Pants version, or first try directly using Pex on the command line to confirm it will fix the issue before upgrading Pants. See https://github.com/pantsbuild/pex#installation for how to install pex and and then run
pex confluent_kafka==1.3.0
d

dry-match-62274

03/25/2020, 7:37 AM
thanks, let me try it
👍 1
I tested 1.26.0rc1 on my local and it works
❤️ 1
thanks 😄
❤️ 1
h

hundreds-father-404

03/25/2020, 2:47 PM
Yay! Did you see the email in pants-devel already about deprecating globs() + using file arguments (./pants test f1.py)?
d

dry-match-62274

03/26/2020, 12:12 AM
oh, I see it, we will try the script to fix all deprecated usage in Build File, and thanks for let us know this 😄
❤️ 1
Hi Eric, we had some question when we updating our Build file.
bundle(fileset=[‘src/scripts/*.sh’], relative_to=‘src’)
we had this bundle in our Build file, how could we convert
relative_to
?
h

hundreds-father-404

03/27/2020, 5:53 AM
relative_to
shouldn’t need any conversion. Is it not working as expected? What was the original
bundle
value?
d

dry-match-62274

03/27/2020, 6:01 AM
Copy code
bundles=[
  bundle(relative_to='script', fileset=globs('script/*')),
...
where the script returns
This script cannot safely update
bundles
fields. Please manually update the
bundle(fileset=)
field to
[‘script/*’]
.
h

hundreds-father-404

03/27/2020, 6:03 AM
Does
bundle(relative_to='script', fileset=['script/*])
work as you’d expect? That should behave identically
d

dry-match-62274

03/27/2020, 6:04 AM
oh, Iet me try, It might be my misunderstanding about the instruction.
👍 1
h

hundreds-father-404

03/27/2020, 6:04 AM
The only reason the script doesn’t update
bundle
is that it’s really tricky to get the formatting right for
bundle
where you don’t mess up things like the
relative_to
field. So, we decided to give a warning rather than trying to automate it
Ah, yeah, to clarify, the instruction isn’t telling you that you can no longer use
relative_to
. You still can.
d

dry-match-62274

03/27/2020, 6:08 AM
because I read it as
replace each bundle(fileset=*) with ['*']
. now I know what should be updated is only the
fileset
part
👍 1
h

hundreds-father-404

03/27/2020, 6:09 AM
Exactly. Sorry for the confusion!
d

dry-match-62274

03/27/2020, 6:09 AM
haha, thanks for help 😄
💯 1
6 Views