Hi guys, we had some issue when try to add `conflu...
# general
d
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
Hi, which version of Pants are you using?
d
Copy code
1.22.0
h
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
thanks, let me try it
👍 1
I tested 1.26.0rc1 on my local and it works
❤️ 1
thanks 😄
❤️ 1
h
Yay! Did you see the email in pants-devel already about deprecating globs() + using file arguments (./pants test f1.py)?
d
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
relative_to
shouldn’t need any conversion. Is it not working as expected? What was the original
bundle
value?
d
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
Does
bundle(relative_to='script', fileset=['script/*])
work as you’d expect? That should behave identically
d
oh, Iet me try, It might be my misunderstanding about the instruction.
👍 1
h
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
because I read it as
replace each bundle(fileset=*) with ['*']
. now I know what should be updated is only the
fileset
part
👍 1
h
Exactly. Sorry for the confusion!
d
haha, thanks for help 😄
💯 1