Whats the best way to get around errors like this?...
# general
a
Whats the best way to get around errors like this?
Copy code
pendulum-2.1.2.tar.gz but it is not compatible with the requested foreign target complete platform cp311-cp311-manylinux_2_36_x86_64
b
When doing a cross-build, from one platform to another, Python requires having pre-built wheels for that platform, when there’s native code involved. Pants inherits that limitation. So, there’s a few ways to achieve this: • in this case, upgrade to the beta version that does have them • Pre build them yourself and put them in an index somewhere • Run the build in a docker environment https://www.pantsbuild.org/docs/environments
a
So for the second option, I've created a
pendulum-2.1.2-cp311-cp311-manylinux_2_36_x86_64.whl
, how do include that in my pex binary? Sorry for all the questions 😊
b
No worries at all! We're getting into territory I'm unfamiliar with (I've been lucky enough to have normal wheels for all dependencies, so far, so haven't had to navigate this)... but I think https://www.pantsbuild.org/docs/reference-python-repos#find_links is the option that'll help, e.g.
Copy code
[python-repos]
find_links = "file://%(buildroot)s/python_wheels"
Or something using
path_mappings
too.
a
Legendary, find links is an array but the rest was spot on. Thanks mate
🎉 1