grredwings / python3-android Goto Github PK
View Code? Open in Web Editor NEWThis project forked from rave-engine/python3-android
Python 3 cross-compilation tools for Android.
License: BSD Zero Clause License
This project forked from rave-engine/python3-android
Python 3 cross-compilation tools for Android.
License: BSD Zero Clause License
I think minimum supported version API 21 from Readme. Is there any reason default is API 23 in build.sh ?
And what is -slim in python-slim, is this a stripped version ?
NDK version:android-ndk-r26c-linux
Error message:
libtool: compile: /android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android23-clang -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I/python3-android/src/Python-3.11.0/Android/sysroot/usr/include -Wall -fPIC -fexceptions -MT src/closures.lo -MD -MP -MF src/.deps/closures.Tpo -c src/closures.c -o src/closures.o
In file included from src/closures.c:570:
./src/dlmalloc.c:3390:7: warning: variable 'nfences' set but not used [-Wunused-but-set-variable]
int nfences = 0;
^
1 warning generated.
depbase=`echo src/tramp.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool --tag=CC --mode=compile /android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android23-clang -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I/python3-android/src/Python-3.11.0/Android/sysroot/usr/include -Wall -fPIC -fexceptions -MT src/tramp.lo -MD -MP -MF $depbase.Tpo -c -o src/tramp.lo src/tramp.c &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: /android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android23-clang -DHAVE_CONFIG_H -I. -I. -I./include -Iinclude -I./src -I/python3-android/src/Python-3.11.0/Android/sysroot/usr/include -Wall -fPIC -fexceptions -MT src/tramp.lo -MD -MP -MF src/.deps/tramp.Tpo -c src/tramp.c -o src/tramp.o
src/tramp.c:262:22: error: call to undeclared function 'open_temp_exec_file'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
tramp_globals.fd = open_temp_exec_file ();
^
1 error generated.
make[2]: *** [Makefile:1320: src/tramp.lo] Error 1
make[2]: Leaving directory '/python3-android/src/Python-3.11.0/Android/deps/libffi-3.4.4'
make[1]: *** [Makefile:1397: all-recursive] Error 1
make[1]: Leaving directory '/python3-android/src/Python-3.11.0/Android/deps/libffi-3.4.4'
make: *** [Makefile:625: all] Error 2
Traceback (most recent call last):
File "/python3-android/src/Python-3.11.0/./Android/build_deps.py", line 172, in <module>
main()
File "/python3-android/src/Python-3.11.0/./Android/build_deps.py", line 169, in main
build_package(pkg_cls(args.target_arch_name, args.android_api_level))
File "/python3-android/src/Python-3.11.0/./Android/build_deps.py", line 147, in build_package
pkg.build()
File "/python3-android/src/Python-3.11.0/./Android/build_deps.py", line 26, in build
self.make()
File "/python3-android/src/Python-3.11.0/./Android/build_deps.py", line 39, in make
self.run(['make'])
File "/python3-android/src/Python-3.11.0/./Android/build_deps.py", line 22, in run
subprocess.check_call(cmd, cwd=cwd)
File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
Look forward to your fixing this problem. Thank you
How to build Python Packages into site-packages after Python build
I'm getting the following error on Android SDK:29
Any help is appreciated..
/data/local/tmp/build/usr/bin # ./python3
bionic/linker/linker_phdr.cpp:168: Load CHECK 'did_read_' failed
Aborted
Hi,
Thank you for making nice setup.
I am trying to add numpy, scipy and opencv into this.
But here i saw you have kept some patch. how to make them what are those really? Are there kind of makefile?
And in source if i keep any official link that should work fine or not.
Can you please help me in this.
Thank you.
Hello. I have a problem after compile it.
I need to add sqlite3 to this.
How can i do it?
I tried to add this in docker-build.sh, but i get a problem.
My docker file :
`#!/bin/bash
set -e
set -x
apt-get update -y
apt-get install -y autoconf-archive autoconf automake cmake gawk gettext git gcc make patch pkg-config libsqlite3-dev
pip install pysqlite3
export ANDROID_NDK=/android-ndk
if [ ! -d "$ANDROID_NDK" ] ; then
# In general we don't want download NDK for every build, but it is simpler to do it here
# for CI builds
NDK_VER=r25b
apt-get install -y wget zip
wget --no-verbose https://dl.google.com/android/repository/android-ndk-$NDK_VER-linux.zip
unzip android-ndk-${NDK_VER}-linux.zip
ANDROID_NDK=/android-ndk-$NDK_VER
fi
cd /python3-android
./build.sh "$@"`
I have this error on my phone
`SyntaxError: invalid syntax
import sqlite3
Traceback (most recent call last):
File "", line 1, in
File "/data/local/tmp/build/usr/lib/python3.11/sqlite3/init.py", line 57, in
from sqlite3.dbapi2 import *
File "/data/local/tmp/build/usr/lib/python3.11/sqlite3/dbapi2.py", line 27, in
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
`
Where can i add sqlite3 module?
Hi, there is an issue while copying all /build files into /data/local/tmp.
As pic shows, the copying operation failed with "Permission denied". To solve this problem, I rooted my phone and found "adb root" works.
So I wonder that whether my Android device must be rooted or not. If not, could u tell me how to solve the "Permission denied" problem? thx.
stat /python3-android/docker-build.sh: no such file or directory: unknown.
build.sh is also having issues.
I would like to interpret python 3 code provided as a string.
Would you like to help me / add a simple code interpreter to examples?
Regards
even when i set CFLAGSEXTRA to include -fPIE, it seems somewhere in the build process, -fPIC is added, causing the resulting binary to be build with PIC. Is there any particular way to disable the -fPIC?
step 1: Py_SetPath is deprecated, please add sys.path
sys.path.append("/data/user/0/com.example.pythontest/files/Python64/") sys.path.append("/data/user/0/com.example.pythontest/files/Python64/lib-dynload")
step 2: fix collections.MutableMapping -> collections.abc.MutableMapping
maybe need cross compile again.
I believe that should be include
, not inclue
.
(Sorry about the issue report. I wanted to leave an inline comment, but the option was not available).
The compilation was successful, but there are exceptions during runtime. There are issues with dynamic libraries when importing modules.
import math
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen failed: cannot locate symbol "PyExc_ValueError" referenced by "/data/local/tmp/build/usr/lib/python3.12/lib-dynload/math.cpython-312.so"...
lf -s /data/local/tmp/build/usr/lib/python3.12/lib-dynload/math.cpython-312.so |grep PyExc_ValueError <
10: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND PyExc_ValueError
203: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND PyExc_ValueError
I'm trying to build python3 on Manjaro, which uses pacman as its package manager, Kindly add support for Manjaro and other Arch Linux distros
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.