numerous-telephone-14552
08/03/2024, 8:43 PMpex_binary(
name="pex_binary",
entry_point="zookeeper_jmx.py",
shebang='/usr/bin/env python3',
platforms=[
'linux_x86_64-cp-38-cp38',
'linux-aarch64-cp-38-cp38',
],
)
I have third party dependency
JPype1==0.6.3
I have created the following wheels
JPype1-0.6.3-cp38-cp38-linux_aarch64.whl
JPype1-0.6.3-cp38-cp38-linux_x86_64.whl
and provided the following pants.toml config
[python-repos]
# No one needs to change these values, as long as they can use the same shared location.
find_links = ["file://%(buildroot)s/wheelhouse"]
path_mappings = ["WHEELS_DIR|%(buildroot)s/wheelhouse"]
I still see messages like
0:32:54.89 [WARN] Pants cannot infer owners for the following imports in the target collectors/lib/zookeeper_jmx/libs/jmx_helper/jmx_helper.py:lib:
* jpype (line: 4)
* jpype.javax (line: 5)
This works for other libraries though when pantsbuild is able to use the wheel for both the patforms. The only difference is the other library wheels are in the following format which has py3-none-any
format.
statsd-1.6.7-py3-none-any.whl
Thanksbetter-van-82973
08/03/2024, 8:59 PMjpype
import. To fix that, you’ll need to add a module_mapping
to wherever your requirements are defined:
https://www.pantsbuild.org/2.22/reference/targets/python_requirements#module_mapping
Your mapping would need to contain something like "JPype1": ["jpype"]
numerous-telephone-14552
08/04/2024, 7:04 PM