Skip to content
4 changes: 2 additions & 2 deletions src/serious_python/bin/package_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const mobilePyPiUrl = "https://pypi.flet.dev";
const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.27.7/full";
const pyodideLockFile = "pyodide-lock.json";

const buildPythonVersion = "3.14.0";
const buildPythonReleaseDate = "20251007";
const buildPythonVersion = "3.14.2";
const buildPythonReleaseDate = "20251209";
const defaultSitePackagesDir = "__pypackages__";
const sitePackagesEnvironmentVariable = "SERIOUS_PYTHON_SITE_PACKAGES";
const flutterPackagesFlutterEnvironmentVariable =
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_android/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
group 'com.flet.serious_python_android'
version '0.9.6'

def python_version = '3.14'
def python_version = '3.14.2'

buildscript {
repositories {
Expand Down
25 changes: 12 additions & 13 deletions src/serious_python_android/lib/serious_python_android.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,17 @@ class SeriousPythonAndroid extends SeriousPythonPlatform {
List<String>? modulePaths,
Map<String, String>? environmentVariables,
bool? sync}) async {
Future setenv(String key, String value) async {
await methodChannel.invokeMethod<String>(
'setEnvironmentVariable', {'name': key, 'value': value});
}
Future<void> setenv(String key, String value) =>
methodChannel.invokeMethod<String>(
'setEnvironmentVariable', {'name': key, 'value': value});

// load libpyjni.so to get JNI reference
try {
await methodChannel
.invokeMethod<String>('loadLibrary', {'libname': 'pyjni'});
await setenv("FLET_JNI_READY", "1");
} catch (e) {
debugPrint("Warning: Unable to load libpyjni.so library: $e");
debugPrint("Unable to load libpyjni.so library: $e");
}

// unpack python bundle
Expand Down Expand Up @@ -78,18 +77,18 @@ class SeriousPythonAndroid extends SeriousPythonPlatform {
moduleSearchPaths.add(sitePackagesPath);
}

setenv("PYTHONINSPECT", "1");
setenv("PYTHONDONTWRITEBYTECODE", "1");
setenv("PYTHONNOUSERSITE", "1");
setenv("PYTHONUNBUFFERED", "1");
setenv("LC_CTYPE", "UTF-8");
setenv("PYTHONHOME", pythonLibPath);
setenv("PYTHONPATH", moduleSearchPaths.join(":"));
await setenv("PYTHONINSPECT", "1");
await setenv("PYTHONDONTWRITEBYTECODE", "1");
await setenv("PYTHONNOUSERSITE", "1");
await setenv("PYTHONUNBUFFERED", "1");
await setenv("LC_CTYPE", "UTF-8");
await setenv("PYTHONHOME", pythonLibPath);
await setenv("PYTHONPATH", moduleSearchPaths.join(":"));

// set environment variables
if (environmentVariables != null) {
for (var v in environmentVariables.entries) {
setenv(v.key, v.value);
await setenv(v.key, v.value);
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/serious_python_android/lib/src/gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25758,25 +25758,25 @@ const int PY_RELEASE_LEVEL_FINAL = 15;

const int PY_MAJOR_VERSION = 3;

const int PY_MINOR_VERSION = 12;
const int PY_MINOR_VERSION = 14;

const int PY_MICRO_VERSION = 3;
const int PY_MICRO_VERSION = 2;

const int PY_RELEASE_LEVEL = 15;

const int PY_RELEASE_SERIAL = 0;

const String PY_VERSION = '3.14.0';
const String PY_VERSION = '3.14.2';

const int PY_VERSION_HEX = 51249392;
const int PY_VERSION_HEX = 51249904;

const int ALIGNOF_LONG = 8;

const int ALIGNOF_MAX_ALIGN_T = 8;

const int ALIGNOF_SIZE_T = 8;

const int ANDROID_API_LEVEL = 21;
const int ANDROID_API_LEVEL = 24;

const int ENABLE_IPV6 = 1;

Expand Down
8 changes: 4 additions & 4 deletions src/serious_python_android/python_ffigen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ globals:
"^class (\\w+) extends ffi.Union": "final class $1 extends ffi.Union"
headers:
entry-points:
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.12/include/python3.12/Python.h"
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.14/include/python3.14/Python.h"
include-directives:
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.12/include/python3.12/*"
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.12/include/python3.12/internal/*"
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.12/include/python3.12/cpython/*"
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.14/include/python3.14/*"
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.14/include/python3.14/internal/*"
- "/Users/feodor/projects/flet-dev/python-mobile/install/android/arm64-v8a/python-3.14/include/python3.14/cpython/*"
name: "CPython"
llvm-path:
- /opt/homebrew/opt/llvm
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_windows/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cmake_policy(SET CMP0063 NEW)
set(PLUGIN_NAME "serious_python_windows_plugin")

set(PYTHON_PACKAGE ${CMAKE_BINARY_DIR}/python)
set(PYTHON_URL "https://github.com/cfms-dev/python-build/releases/download/v3.14/python-windows-for-dart-3.14.zip")
set(PYTHON_URL "https://github.com/cfms-dev/python-build/releases/download/v3.14.2/python-windows-for-dart-3.14.2.zip")
set(PYTHON_FILE ${CMAKE_BINARY_DIR}/python-windows-for-dart.zip)
if (NOT EXISTS ${PYTHON_FILE})
file(DOWNLOAD ${PYTHON_URL} ${PYTHON_FILE})
Expand Down
Loading