Skip to content

Commit 7473a2c

Browse files
authored
Merge branch 'kivy:develop' into firebase
2 parents 842fca5 + be3de2e commit 7473a2c

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

pythonforandroid/recipes/pyjnius/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class PyjniusRecipe(PyProjectRecipe):
1414

1515
patches = [
1616
"use_cython.patch",
17+
"cython_version_pin.patch",
1718
('genericndkbuild_jnienv_getter.patch', will_build('genericndkbuild')),
1819
('sdl3_jnienv_getter.patch', will_build('sdl3')),
1920
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--- pyjnius-1.6.1/pyproject.toml 2023-11-05 21:07:43.000000000 +0530
2+
+++ pyjnius-1.6.1.mod/pyproject.toml 2025-05-11 20:31:14.699072764 +0530
3+
@@ -2,5 +2,5 @@
4+
requires = [
5+
"setuptools>=58.0.0",
6+
"wheel",
7+
- "Cython"
8+
+ "Cython==3.0.0"
9+
]

pythonforandroid/recipes/sdl2_image/__init__.py

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
import sh
33
from pythonforandroid.logger import shprint
44
from pythonforandroid.recipe import BootstrapNDKRecipe
5-
from pythonforandroid.util import current_directory
65

76

87
class LibSDL2Image(BootstrapNDKRecipe):
9-
version = '2.8.0'
8+
version = '2.8.2'
109
url = 'https://github.com/libsdl-org/SDL_image/releases/download/release-{version}/SDL2_image-{version}.tar.gz'
1110
dir_name = 'SDL2_image'
1211

@@ -20,10 +19,26 @@ def get_include_dirs(self, arch):
2019
def prebuild_arch(self, arch):
2120
# We do not have a folder for each arch on BootstrapNDKRecipe, so we
2221
# need to skip the external deps download if we already have done it.
23-
external_deps_dir = os.path.join(self.get_build_dir(arch.arch), "external")
24-
if not os.path.exists(os.path.join(external_deps_dir, "libwebp")):
25-
with current_directory(external_deps_dir):
26-
shprint(sh.Command("./download.sh"))
22+
23+
build_dir = self.get_build_dir(arch.arch)
24+
25+
with open(os.path.join(build_dir, ".gitmodules"), "r") as file:
26+
for section in file.read().split('[submodule "')[1:]:
27+
line_split = section.split(" = ")
28+
# Parse .gitmodule section
29+
clone_path, url, branch = (
30+
os.path.join(build_dir, line_split[1].split("\n")[0].strip()),
31+
line_split[2].split("\n")[0].strip(),
32+
line_split[-1].strip()
33+
)
34+
# Clone if needed
35+
if not os.path.exists(clone_path) or not os.listdir(clone_path):
36+
shprint(
37+
sh.git, "clone", url,
38+
"--depth", "1", "-b",
39+
branch, clone_path, "--recursive"
40+
)
41+
2742
super().prebuild_arch(arch)
2843

2944

0 commit comments

Comments
 (0)