Open pmp-p opened 4 years ago
Another example using :
sysconfig.get_platform()
sysconfig.get_config_vars('INCLUDEDIR')
[PyDK:armeabi-v7a] /data/cross/pydk/testing/pygame $ pip3-armeabi-v7a wheel .
Processing /data/cross/pydk/testing/pygame
Building wheels for collected packages: pygame
Building wheel for pygame (setup.py) ... done
Created wheel for pygame: filename=pygame-2.0.1.dev1-cp39-cp39-armv7a_19_android.whl size=3158603 sha256=8aab801a2f7f5bb4b1441ea8ef238ab7d87a6146474bc399348293686ba9ab98
Stored in directory: /tmp/pip-ephem-wheel-cache-2cn1i_9y/wheels/b5/14/de/55664e14fd0cccd3089431b21da9fa1d8aa6deee0833e13657
Successfully built pygame
[PyDK:armeabi-v7a] /data/cross/pydk/testing/pygame $
[PyDK:armeabi-v7a] /data/cross/pydk/testing/pygame $ pip3-armeabi-v7a install .
Processing /data/cross/pydk/testing/pygame
Skipping wheel build for pygame, due to binaries being disabled for it.
Installing collected packages: pygame
Running setup.py install for pygame ... done
Successfully installed pygame-2.0.1.dev1
[PyDK:armeabi-v7a] /data/cross/pydk/testing/pygame $
is an installation of cross pip toolchain via pip (like p4a) viable ?
https://github.com/pygame/pygame/pull/2311#issuecomment-728741841
Preleminary discussion was engaged with @tshirtman on python-for-android, idea looks welcomed but time/manpower seems to lack both sides.
Meanwhile Beeware pip support seems stuck somewhere in an ungranted future. Python-Android-support issue 8 maybe.
Interesting side effect of multiarch pip shell with https://github.com/eerimoq/mys from @eerimoq is to allow transpiling + cross compiling a python subset to native code ( AOT ).
llvm-jit based python modules like pythran ( or transonic backends) not tested yet.
sidenote : pip module cross-testing on android and wasm ( not wasi ) is blocked by a 12 years old bug https://github.com/python/cpython/pull/22190 fixed in 3.11
see uname
machine to reflect wasm architecture :
https://github.com/emscripten-core/emscripten/pull/13440 <= merged !
see uname
should return something more meaningful
https://github.com/emscripten-core/emscripten/issues/13356
not sure how it would affect pip downloads but it may: No more exec from data folder on targetAPI >= Android Q ( termux termux-app 1072 )
Following the pattern
<cpuarch>-<libc-api>-<libc-abi>
, values defined forsysconfig.get_platform()
andsysconfig.get_config_vars('MULTIARCH')
:shell.wasm.sh :
wasm_1_emscripten
orwasm_1pic_emscripten
TODO: iirc there are variants API/ABI wasm/asm.js flavours regarding asyncify and threading for emscripten.shell.armeabi-v7a.sh :
armv7a_19_android
shell.arm64-v8a.sh :
aarch64_21_android
shell.x86.sh :
i686_19_android
shell.x86_64.sh :
x86_64_21_android
and also :
shell.wasi64.sh :
wasm64_1_wasi
orwasm64_1pic_wasi
shell.wasi32.sh :
wasm32_1_wasi
orwasm32_1pic_wasi
shell.asm.js.sh :
asmjs_1_fastcomp
Exemple of a pip 3.9 wheel build session :