Hey, I'm trying to build a linux docker image that...
# general
p
Hey, I'm trying to build a linux docker image that will run python. Some of the packages do not have prebuilt wheels for my platform, so I built them separately and put them under
dist/wheels
This results in the following structure -
Copy code
./dist/wheels/reportlab-3.5.68-cp39-cp39-linux_aarch64.whl
./dist/wheels/Pillow-9.5.0-cp39-cp39-manylinux_2_28_aarch64.wh
Trying to package the library with custom
find_links
fails, no matter how they're specified (pants.toml / env / flags)
Copy code
pants package --python-repos-find-links="['/Users/kobybass/proj/monorepo/dist/wheels']" app/reporting:bin
I get the following error:
Copy code
stderr:
No pre-built wheel was available for reportlab 3.5.68.
Successfully built the wheel reportlab-3.5.68-cp39-cp39-macosx_13_0_arm64.whl from the sdist reportlab-3.5.68.tar.gz but it is not compatible with the requested foreign target complete platform cp39-cp39-manylinux_2_36_aarch64.
You'll need to build a wheel from reportlab-3.5.68.tar.gz on the foreign target platform and make it available to Pex via a `--find-links` repo or a custom `--index`.
I suspect that the pex_binary does not respect the
find-links
. TL;DR - What's the correct approach to point the PEX binary to prebuilt wheels? Solution - Needed to regenerate the lockfile and adding find-links globally
1
g
I've never tried this, but I'd suspect you need to add that find-links setting globally so these wheels are included in your lockfiles etc.
p
Thanks Tom! I didn't update the lockfile, and now it seems like it's fixed! Much appreciated!
🙇 1