-
Notifications
You must be signed in to change notification settings - Fork 2k
recipes: new recipe pydantic-core
#2957
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@Kacper-OS armv7 = armeabi-v7a
aarch64 = arm64-v8a Setps to setup rust: curl https://sh.rustup.rs -sSf > rustup.sh
sh rustup.sh -y --default-toolchain "<rust version here>"
export PATH="~/.cargo/bin:${PATH}"
rustup target add "<arch code>-linux-androideabi" |
OK, thanks I will fix this issue |
OK, now what I have to do ? |
from shutil import which
import sh
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
from pythonforandroid.logger import error, shprint
from pythonforandroid.util import current_directory
class PydanticcoreRecipe(CompiledComponentsPythonRecipe):
version = "2.16.1"
url = (
"https://github.com/pydantic/pydantic-core/archive/refs/tags/v{version}.tar.gz"
)
depends = ["typing-extensions"]
def get_recipe_env(self, arch):
env = super().get_recipe_env(arch)
env["CARGO_BUILD_TARGET"] = "{}-linux-androideabi".format(
{
"arm64-v8a": "aarch64",
"armeabi-v7a": "armv7",
"x86_64": "x86_64",
"x86": "i686",
}[str(arch)]
)
env['PATH'] = (
'{hostpython_dir}:{old_path}').format(
hostpython_dir=self.get_recipe(
'hostpython3' , self.ctx).get_path_to_python(),
old_path=env['PATH'])
return env
def build_arch(self, arch):
with current_directory(self.get_build_dir(arch.arch)):
shprint(
sh.maturin,
"build",
"-i",
"python3.11",
_env=self.get_recipe_env(arch)
)
recipe = PydanticcoreRecipe() You need to add things in there, I have made basic script. rustup target add armv7-linux-androideabi Like this... |
However build still fails:
This is because of Edit:
Doing something like: self.install_libs(arch, join(
arch.ndk_lib_dir,
'lib{name}.so'.format(name="log"),
) ) Before build. |
ok thanks again |
Can be closed as surpassed by #2962 |
No description provided.