benfogle / crossenv

Cross-compiling virtualenv for Python
MIT License
108 stars 22 forks source link

Making Android toolchain portable #115

Open FeodorFitsner opened 4 months ago

FeodorFitsner commented 4 months ago

Thank you for the great tool!

In our case host Python distributive is built on VM with Android SDK installed at /usr/lib/android-sdk/ndk/26.2.11394342/toolchains/llvm/prebuilt/linux-x86_64 and if a user has toolchain installed in a different location this host python, obviously, does not work with crossenv on their machine.

I see original toolchain path presents in multiple files:

What would be the solution to make crossenv and host-python to work with Android toolchain in location, different from the one Python was built with?

Is there an already some option in crossenv? Would simple find-replace over those files work?

benfogle commented 1 month ago

Sorry, I somehow missed this issue.

Crossenv has a --relative-toolchain option that should do what you want. You will just need to make sure that the SDK binaries are in $PATH.

FeodorFitsner commented 1 month ago

Will give it a try!