diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index f7596bb9..204459bb 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -32,32 +32,34 @@ const platforms = { "iphoneos.arm64": {"tag": "ios-13.0-arm64-iphoneos", "mac_ver": ""}, "iphonesimulator.arm64": { "tag": "ios-13.0-arm64-iphonesimulator", - "mac_ver": "" + "mac_ver": "", }, "iphonesimulator.x86_64": { "tag": "ios-13.0-x86_64-iphonesimulator", - "mac_ver": "" - } + "mac_ver": "", + }, }, "Android": { "arm64-v8a": {"tag": "android-24-arm64-v8a", "mac_ver": ""}, "armeabi-v7a": {"tag": "android-24-armeabi-v7a", "mac_ver": ""}, "x86_64": {"tag": "android-24-x86_64", "mac_ver": ""}, - "x86": {"tag": "android-24-x86", "mac_ver": ""} + "x86": {"tag": "android-24-x86", "mac_ver": ""}, }, "Pyodide": { - "": {"tag": "pyodide-2024.0-wasm32", "mac_ver": ""} + "": {"tag": "pyodide-2024.0-wasm32", "mac_ver": ""}, }, "Darwin": { "arm64": {"tag": "", "mac_ver": "arm64"}, - "x86_64": {"tag": "", "mac_ver": "x86_64"} + "x86_64": {"tag": "", "mac_ver": "x86_64"}, }, "Windows": { - "": {"tag": "", "mac_ver": ""} + "arm64": {"tag": "", "mac_ver": ""}, + "x86_64": {"tag": "", "mac_ver": ""}, }, "Linux": { - "": {"tag": "", "mac_ver": ""} - } + "arm64": {"tag": "", "mac_ver": ""}, + "x86_64": {"tag": "", "mac_ver": ""}, + }, }; const junkFilesDesktop = [ @@ -94,46 +96,80 @@ class PackageCommand extends Command { final description = "Packages Python app into Flutter asset."; PackageCommand() { - argParser.addOption('platform', - abbr: "p", - allowed: ["iOS", "Android", "Pyodide", "Windows", "Linux", "Darwin"], - mandatory: true, - help: "Install dependencies for specific platform, e.g. 'Android'."); - argParser.addMultiOption('arch', - help: - "Install dependencies for specific architectures only. Leave empty to install all supported architectures."); - argParser.addMultiOption('requirements', - abbr: "r", - help: "The list of dependencies to install. Allows any pip options.'", - splitCommas: false); - argParser.addOption('asset', - abbr: 'a', - help: - "Output asset path, relative to pubspec.yaml, to package Python program into."); - argParser.addMultiOption('exclude', - help: - "List of relative paths to exclude from app package, e.g. \"assets,build\"."); - argParser.addFlag("skip-site-packages", - help: "Skip installation of site packages.", negatable: false); - argParser.addFlag("compile-app", - help: "Compile Python application before packaging.", negatable: false); - argParser.addFlag("compile-packages", - help: "Compile application packages before packaging.", - negatable: false); - argParser.addFlag("cleanup", - help: - "Cleanup app and packages from unneccessary files and directories.", - negatable: false); - argParser.addFlag("cleanup-app", - help: "Cleanup app from unneccessary files and directories.", - negatable: false); - argParser.addMultiOption('cleanup-app-files', - help: "List of globs to delete extra app files and directories."); - argParser.addFlag("cleanup-packages", - help: "Cleanup packages from unneccessary files and directories.", - negatable: false); - argParser.addMultiOption('cleanup-package-files', - help: "List of globs to delete extra packages files and directories."); + argParser.addOption( + 'platform', + abbr: "p", + allowed: ["iOS", "Android", "Pyodide", "Windows", "Linux", "Darwin"], + mandatory: true, + help: "Install dependencies for specific platform, e.g. 'Android'.", + ); + argParser.addMultiOption( + 'arch', + help: + "Install dependencies for specific architectures only. Leave empty to install all supported architectures.", + ); + argParser.addMultiOption( + 'requirements', + abbr: "r", + help: "The list of dependencies to install. Allows any pip options.'", + splitCommas: false, + ); + argParser.addOption( + 'build-type', + abbr: 'b', + allowed: ['Debug', 'Profile', 'Release'], + defaultsTo: 'Release', + help: "Build type of application, one of debug, profile or release.", + ); + argParser.addOption( + 'asset', + abbr: 'a', + help: + "Output asset path, relative to pubspec.yaml, to package Python program into.", + ); + argParser.addMultiOption( + 'exclude', + help: + "List of relative paths to exclude from app package, e.g. \"assets,build\".", + ); + argParser.addFlag( + "skip-site-packages", + help: "Skip installation of site packages.", + negatable: false, + ); + argParser.addFlag( + "compile-app", + help: "Compile Python application before packaging.", + negatable: false, + ); + argParser.addFlag( + "compile-packages", + help: "Compile application packages before packaging.", + negatable: false, + ); + argParser.addFlag( + "cleanup", + help: "Cleanup app and packages from unneccessary files and directories.", + negatable: false, + ); + argParser.addFlag( + "cleanup-app", + help: "Cleanup app from unneccessary files and directories.", + negatable: false, + ); + argParser.addMultiOption( + 'cleanup-app-files', + help: "List of globs to delete extra app files and directories.", + ); + argParser.addFlag( + "cleanup-packages", + help: "Cleanup packages from unneccessary files and directories.", + negatable: false, + ); + argParser.addMultiOption( + 'cleanup-package-files', + help: "List of globs to delete extra packages files and directories.", + ); argParser.addFlag("verbose", help: "Verbose output.", negatable: false); } @@ -160,6 +196,7 @@ class PackageCommand extends Command { String platform = argResults?['platform']; List archArg = argResults?['arch']; List requirements = argResults?['requirements']; + String buildType = argResults?['build-type']; String? assetPath = argResults?['asset']; List exclude = argResults?['exclude']; bool skipSitePackages = argResults?["skip-site-packages"]; @@ -183,13 +220,13 @@ class PackageCommand extends Command { exit(2); } - if (!await sourceDir.exists()) { + if (!sourceDir.existsSync()) { stderr.writeln('Source directory does not exist.'); exit(2); } final pubspecFile = File(path.join(currentPath, "pubspec.yaml")); - if (!await pubspecFile.exists()) { + if (!pubspecFile.existsSync()) { stderr.writeln("Current directory must contain pubspec.yaml."); exit(2); } @@ -204,15 +241,16 @@ class PackageCommand extends Command { if (platform == "Pyodide") { pyodidePyPiServer = await startSimpleServer(); extraPyPiIndexes.add( - "http://${pyodidePyPiServer.address.host}:${pyodidePyPiServer.port}/simple"); + "http://${pyodidePyPiServer.address.host}:${pyodidePyPiServer.port}/simple", + ); } stdout.writeln("Extra PyPi indexes: $extraPyPiIndexes"); // ensure standard Dart/Flutter "build" directory exists _buildDir = Directory(path.join(currentPath, "build")); - if (!await _buildDir!.exists()) { - await _buildDir!.create(); + if (!_buildDir!.existsSync()) { + _buildDir!.createSync(); } // asset path @@ -224,20 +262,25 @@ class PackageCommand extends Command { // create dest dir final dest = File(path.join(currentPath, assetPath)); - if (!await dest.parent.exists()) { + if (!dest.parent.existsSync()) { stdout.writeln("Creating asset directory: ${dest.parent.path}"); - await dest.parent.create(recursive: true); + dest.parent.createSync(recursive: true); } // create temp dir - tempDir = await Directory.systemTemp.createTemp('serious_python_temp'); + tempDir = Directory.systemTemp.createTempSync('serious_python_temp'); stdout.writeln("Created temp directory: ${tempDir.path}"); // copy app to a temp dir stdout.writeln( - "Copying Python app from ${sourceDir.path} to a temp directory"); - await copyDirectory(sourceDir, tempDir, sourceDir.path, - exclude.map((s) => s.trim()).toList()); + "Copying Python app from ${sourceDir.path} to a temp directory", + ); + await copyDirectory( + sourceDir, + tempDir, + sourceDir.path, + exclude.map((s) => s.trim()).toList(), + ); // compile all python code if (compileApp) { @@ -253,7 +296,8 @@ class PackageCommand extends Command { var allJunkFiles = [...junkFiles, ...cleanupAppFiles]; if (_verbose) { verbose( - "Delete unnecessary app files and directories: $allJunkFiles"); + "Delete unnecessary app files and directories: $allJunkFiles", + ); } else { stdout.writeln(("Cleanup app")); } @@ -263,25 +307,33 @@ class PackageCommand extends Command { // install requirements if (requirements.isNotEmpty && !skipSitePackages) { String? sitePackagesRoot; - - if (platform != "Pyodide") { - if (Platform.environment - .containsKey(sitePackagesEnvironmentVariable)) { + if (platform == 'Windows' || platform == 'Linux') { + sitePackagesRoot = path.join(tempDir.path, defaultSitePackagesDir); + } else if (platform != "Pyodide") { + if (Platform.environment.containsKey( + sitePackagesEnvironmentVariable, + )) { sitePackagesRoot = Platform.environment[sitePackagesEnvironmentVariable]; } if (sitePackagesRoot == null || sitePackagesRoot.isEmpty) { + verbose( + "Setting sitePackagesRoot(./build/site-packages): $sitePackagesRoot", + ); sitePackagesRoot = path.join(currentPath, "build", "site-packages"); } } else { + verbose( + "Setting sitePackagesRoot(tempDir,defaultSitePackagesDir): ${path.join(tempDir.path, defaultSitePackagesDir)}", + ); sitePackagesRoot = path.join(tempDir.path, defaultSitePackagesDir); } - - if (await Directory(sitePackagesRoot).exists()) { - await for (var f in Directory(sitePackagesRoot) - .list() - .where((f) => !path.basename(f.path).startsWith("."))) { - await f.delete(recursive: true); + if (Directory(sitePackagesRoot).existsSync()) { + verbose("Deleting packages from sitePackagesRoot: $sitePackagesRoot"); + await for (var f in Directory( + sitePackagesRoot, + ).list().where((f) => !path.basename(f.path).startsWith("."))) { + f.deleteSync(recursive: true); } } @@ -291,57 +343,94 @@ class PackageCommand extends Command { if (archArg.isNotEmpty && !archArg.contains(arch.key)) { continue; } - String? sitePackagesDir; + stdout.writeln( + "Invoking pip for platform/arch: $platform/${arch.key}", + ); + // String sitePackagesDir = sitePackagesRoot; Map? pipEnv; Directory? sitecustomizeDir; try { // customized pip // create temp dir with sitecustomize.py for mobile and web - sitecustomizeDir = await Directory.systemTemp - .createTemp('serious_python_sitecustomize'); - var sitecustomizePath = - path.join(sitecustomizeDir.path, "sitecustomize.py"); + sitecustomizeDir = Directory.systemTemp.createTempSync( + 'serious_python_sitecustomize', + ); + var sitecustomizePath = path.join( + sitecustomizeDir.path, + "sitecustomize.py", + ); if (_verbose) { verbose( - "Configured $platform/${arch.key} platform with sitecustomize.py at $sitecustomizePath"); + "Configured $platform/${arch.key} platform with sitecustomize.py at $sitecustomizePath", + ); } else { stdout.writeln( - "Configured $platform/${arch.key} platform with sitecustomize.py"); + "Configured $platform/${arch.key} platform with sitecustomize.py", + ); } - await File(sitecustomizePath).writeAsString(sitecustomizePy - .replaceAll( - "{platform}", arch.value["tag"]!.isNotEmpty ? platform : "") - .replaceAll("{tag}", arch.value["tag"]!) - .replaceAll("{mac_ver}", arch.value["mac_ver"]!)); + File(sitecustomizePath).writeAsStringSync( + sitecustomizePy + .replaceAll( + "{platform}", + arch.value["tag"]!.isNotEmpty ? platform : "", + ) + .replaceAll("{tag}", arch.value["tag"]!) + .replaceAll("{mac_ver}", arch.value["mac_ver"]!), + ); // print(File(sitecustomizePath).readAsStringSync()); pipEnv = { - "PYTHONPATH": - [sitecustomizeDir.path].join(Platform.isWindows ? ";" : ":"), + "PYTHONPATH": [ + sitecustomizeDir.path, + ].join(Platform.isWindows ? ";" : ":"), }; - - sitePackagesDir = arch.key.isNotEmpty - ? path.join(sitePackagesRoot, arch.key) - : sitePackagesRoot; - if (!await Directory(sitePackagesDir).exists()) { - await Directory(sitePackagesDir).create(recursive: true); + String buildDir = path.join( + currentPath, + 'build', + Platform.operatingSystem, + arch.key == "x86_64" ? "x64" : arch.key, + "runner", + Platform.isWindows ? buildType : buildType.toLowerCase(), + ); + final sitePackagesDir = + arch.key.isNotEmpty + ? Platform.isWindows + ? path.join(buildDir, "site-packages") + : path.join(buildDir, "python3.12", "site-packages") + : sitePackagesRoot; + if (!Directory(sitePackagesDir).existsSync()) { + verbose("Creating sitePackagesDir: $sitePackagesDir"); + Directory(sitePackagesDir).createSync(recursive: true); } - stdout.writeln( - "Installing $requirements with pip command to $sitePackagesDir"); + verbose( + "Installing $requirements with pip command to $sitePackagesDir", + ); List pipArgs = ["--disable-pip-version-check"]; + if (compilePackages) { + pipArgs.addAll(['--compile', '--only-binary=:all:']); + if (platform == 'Windows') { + if (arch.key == 'arm64') { + pipArgs.addAll(["--platform", "win_arm64"]); + } else { + pipArgs.addAll(["--platform", "win_amd64"]); + } + } + } + if (isMobile || isWeb) { pipArgs.addAll(["--only-binary", ":all:"]); - if (Platform.environment - .containsKey(allowSourceDistrosEnvironmentVariable)) { + if (Platform.environment.containsKey( + allowSourceDistrosEnvironmentVariable, + )) { pipArgs.addAll([ "--no-binary", - Platform.environment[allowSourceDistrosEnvironmentVariable]! + Platform.environment[allowSourceDistrosEnvironmentVariable]!, ]); } } @@ -358,29 +447,37 @@ class PackageCommand extends Command { ...pipArgs, '--target', sitePackagesDir, - ...requirements + ...requirements, ], environment: pipEnv); // move $sitePackagesDir/flutter if env var is defined - if (Platform.environment - .containsKey(flutterPackagesFlutterEnvironmentVariable)) { - var flutterPackagesRoot = Platform - .environment[flutterPackagesFlutterEnvironmentVariable]; + if (Platform.environment.containsKey( + flutterPackagesFlutterEnvironmentVariable, + )) { + var flutterPackagesRoot = + Platform + .environment[flutterPackagesFlutterEnvironmentVariable]; var flutterPackagesRootDir = Directory(flutterPackagesRoot!); - var sitePackagesFlutterDir = - Directory(path.join(sitePackagesDir, "flutter")); - if (await sitePackagesFlutterDir.exists()) { + var sitePackagesFlutterDir = Directory( + path.join(sitePackagesDir, "flutter"), + ); + if (sitePackagesFlutterDir.existsSync()) { if (!flutterPackagesCopied) { stdout.writeln( - "Copying Flutter packages to $flutterPackagesRoot"); - if (!await flutterPackagesRootDir.exists()) { - await flutterPackagesRootDir.create(recursive: true); + "Copying Flutter packages to $flutterPackagesRoot", + ); + if (!flutterPackagesRootDir.existsSync()) { + flutterPackagesRootDir.createSync(recursive: true); } - await copyDirectory(sitePackagesFlutterDir, - flutterPackagesRootDir, sitePackagesFlutterDir.path, []); + await copyDirectory( + sitePackagesFlutterDir, + flutterPackagesRootDir, + sitePackagesFlutterDir.path, + [], + ); flutterPackagesCopied = true; } - await sitePackagesFlutterDir.delete(recursive: true); + sitePackagesFlutterDir.deleteSync(recursive: true); } } @@ -390,6 +487,7 @@ class PackageCommand extends Command { await runPython(['-m', 'compileall', '-b', sitePackagesDir]); verbose("Deleting original .py files"); + await cleanupDir(Directory(sitePackagesDir), ["**.py"]); } @@ -398,53 +496,63 @@ class PackageCommand extends Command { var allJunkFiles = [...junkFiles, ...cleanupPackageFiles]; if (_verbose) { verbose( - "Delete unnecessary package files and directories: $allJunkFiles"); + "Delete unnecessary package files and directories: $allJunkFiles", + ); } else { stdout.writeln(("Cleanup installed packages")); } await cleanupDir(Directory(sitePackagesDir), allJunkFiles); } } finally { - if (sitecustomizeDir != null && await sitecustomizeDir.exists()) { + if (sitecustomizeDir != null && sitecustomizeDir.existsSync()) { verbose( - "Deleting sitecustomize directory ${sitecustomizeDir.path}"); - await sitecustomizeDir.delete(recursive: true); + "Deleting sitecustomize directory ${sitecustomizeDir.path}", + ); + sitecustomizeDir.deleteSync(recursive: true); } } } // for each arch if (platform == "Darwin") { await macos_utils.mergeMacOsSitePackages( - path.join(sitePackagesRoot, "arm64"), - path.join(sitePackagesRoot, "x86_64"), - path.join(sitePackagesRoot), - _verbose); + path.join(sitePackagesRoot, "arm64"), + path.join(sitePackagesRoot, "x86_64"), + path.join(sitePackagesRoot), + _verbose, + ); } // synchronize pod - var syncSh = - File(path.join(sitePackagesRoot, ".pod", "sync_site_packages.sh")); - if (await syncSh.exists()) { + var syncSh = File( + path.join(sitePackagesRoot, ".pod", "sync_site_packages.sh"), + ); + if (syncSh.existsSync()) { await runExec("/bin/sh", [syncSh.path]); } } // create archive stdout.writeln( - "Creating app archive at ${dest.path} from a temp directory"); + "Creating app archive at ${dest.path} from a temp directory", + ); final encoder = ZipFileEncoder(); encoder.zipDirectory(tempDir, filename: dest.path); // create hash file stdout.writeln("Writing app archive hash to ${dest.path}.hash"); - await File("${dest.path}.hash") - .writeAsString(await calculateFileHash(dest.path)); + File( + "${dest.path}.hash", + ).writeAsStringSync(await calculateFileHash(dest.path)); } catch (e) { - stdout.writeln("Error: $e"); + verbose("Error: $e"); } finally { - if (tempDir != null && await tempDir.exists()) { + if (tempDir != null && tempDir.existsSync()) { stdout.writeln("Deleting temp directory"); - await tempDir.delete(recursive: true); + try { + tempDir.deleteSync(recursive: true); + } on Exception catch (e, s) { + verbose('$e\n\n$s'); + } } if (pyodidePyPiServer != null) { stdout.writeln("Shutting down Pyodide PyPI server"); @@ -453,21 +561,31 @@ class PackageCommand extends Command { } } - Future copyDirectory(Directory source, Directory destination, - String rootDir, List excludeList) async { + Future copyDirectory( + Directory source, + Directory destination, + String rootDir, + List excludeList, + ) async { await for (var entity in source.list()) { if (excludeList.contains(path.relative(entity.path, from: rootDir))) { continue; } if (entity is Directory) { - final newDirectory = - Directory(path.join(destination.path, path.basename(entity.path))); - await newDirectory.create(); + final newDirectory = Directory( + path.join(destination.path, path.basename(entity.path)), + ); + newDirectory.createSync(); await copyDirectory( - entity.absolute, newDirectory, rootDir, excludeList); + entity.absolute, + newDirectory, + rootDir, + excludeList, + ); } else if (entity is File) { - await entity - .copy(path.join(destination.path, path.basename(entity.path))); + entity.copySync( + path.join(destination.path, path.basename(entity.path)), + ); } } } @@ -475,23 +593,30 @@ class PackageCommand extends Command { Future cleanupDir(Directory directory, List filesGlobs) async { verbose("Cleanup directory ${directory.path}: $filesGlobs"); await cleanupDirRecursive( - directory, - filesGlobs.map((g) => Glob(g.replaceAll("\\", "/"), - context: path.Context(current: directory.path)))); + directory, + filesGlobs.map( + (g) => Glob( + g.replaceAll("\\", "/"), + context: path.Context(current: directory.path), + ), + ), + ); } Future cleanupDirRecursive( - Directory directory, Iterable globs) async { + Directory directory, + Iterable globs, + ) async { var emptyDir = true; for (var entity in directory.listSync()) { if (globs.any((g) => g.matches(entity.path.replaceAll("\\", "/"))) && - await entity.exists()) { + entity.existsSync()) { verbose("Deleting ${entity.path}"); - await entity.delete(recursive: true); + entity.deleteSync(recursive: true); } else if (entity is Directory) { if (await cleanupDirRecursive(entity, globs)) { verbose("Deleting empty directory ${entity.path}"); - await entity.delete(recursive: true); + entity.deleteSync(recursive: true); } else { emptyDir = false; } @@ -502,8 +627,11 @@ class PackageCommand extends Command { return emptyDir; } - Future runExec(String execPath, List args, - {Map? environment}) async { + Future runExec( + String execPath, + List args, { + Map? environment, + }) async { final proc = await Process.start(execPath, args, environment: environment); await for (final line in proc.stdout.transform(utf8.decoder)) { @@ -517,14 +645,17 @@ class PackageCommand extends Command { return proc.exitCode; } - Future runPython(List args, - {Map? environment}) async { + Future runPython( + List args, { + Map? environment, + }) async { if (_pythonDir == null) { _pythonDir = Directory( - path.join(_buildDir!.path, "build_python_$buildPythonVersion")); + path.join(_buildDir!.path, "build_python_$buildPythonVersion"), + ); - if (!await _pythonDir!.exists()) { - await _pythonDir!.create(); + if (!_pythonDir!.existsSync()) { + _pythonDir!.createSync(); var isArm64 = Platform.version.contains("arm64"); @@ -537,43 +668,54 @@ class PackageCommand extends Command { arch = 'x86_64-unknown-linux-gnu'; } else if (Platform.isLinux && isArm64) { arch = 'aarch64-unknown-linux-gnu'; - } else if (Platform.isWindows) { + } else if (Platform.isWindows && !isArm64) { arch = 'x86_64-pc-windows-msvc-shared'; + } else if (Platform.isWindows && isArm64) { + arch = 'aarch64-pc-windows-msvc-shared'; } var pythonArchiveFilename = "cpython-$buildPythonVersion+$buildPythonReleaseDate-$arch-install_only_stripped.tar.gz"; - var pythonArchivePath = - path.join(_buildDir!.path, pythonArchiveFilename); + var pythonArchivePath = path.join( + _buildDir!.path, + pythonArchiveFilename, + ); - if (!await File(pythonArchivePath).exists()) { + if (!File(pythonArchivePath).existsSync()) { // download Python distr from GitHub final url = "https://github.com/astral-sh/python-build-standalone/releases/download/$buildPythonReleaseDate/$pythonArchiveFilename"; if (_verbose) { verbose( - "Downloading Python distributive from $url to $pythonArchivePath"); + "Downloading Python distributive from $url to $pythonArchivePath", + ); } else { stdout.writeln( - "Downloading Python distributive from $url to a build directory"); + "Downloading Python distributive from $url to a build directory", + ); } var response = await http.get(Uri.parse(url)); - await File(pythonArchivePath).writeAsBytes(response.bodyBytes); + File(pythonArchivePath).writeAsBytesSync(response.bodyBytes); } // extract Python from archive if (_verbose) { verbose( - "Extracting Python distributive from $pythonArchivePath to ${_pythonDir!.path}"); + "Extracting Python distributive from $pythonArchivePath to ${_pythonDir!.path}", + ); } else { stdout.writeln("Extracting Python distributive"); } - await Process.run( - 'tar', ['-xzf', pythonArchivePath, '-C', _pythonDir!.path]); + await Process.run('tar', [ + '-xzf', + pythonArchivePath, + '-C', + _pythonDir!.path, + ]); if (Platform.isMacOS) { duplicateSysconfigFile(_pythonDir!.path); @@ -581,9 +723,10 @@ class PackageCommand extends Command { } } - var pythonExePath = Platform.isWindows - ? path.join(_pythonDir!.path, 'python', 'python.exe') - : path.join(_pythonDir!.path, 'python', 'bin', 'python3'); + var pythonExePath = + Platform.isWindows + ? path.join(_pythonDir!.path, 'python', 'python.exe') + : path.join(_pythonDir!.path, 'python', 'bin', 'python3'); // Run the python executable verbose([pythonExePath, ...args].join(" ")); @@ -591,8 +734,10 @@ class PackageCommand extends Command { } void duplicateSysconfigFile(String pythonDir) { - final sysConfigGlob = Glob("python/lib/python3.*/_sysconfigdata__*.py", - context: path.Context(current: pythonDir)); + final sysConfigGlob = Glob( + "python/lib/python3.*/_sysconfigdata__*.py", + context: path.Context(current: pythonDir), + ); for (var sysConfig in sysConfigGlob.listSync(root: pythonDir)) { // copy the first found sys config and exit if (sysConfig is File) { @@ -616,8 +761,9 @@ class PackageCommand extends Command { const htmlHeader = "\n"; const htmlFooter = "\n"; - var pyodidePackages = - await fetchJsonFromUrl("$pyodideRootUrl/$pyodideLockFile"); + var pyodidePackages = await fetchJsonFromUrl( + "$pyodideRootUrl/$pyodideLockFile", + ); var wheels = Map.from(pyodidePackages["packages"]) ..removeWhere((k, p) => !p["file_name"].endsWith(".whl")); @@ -628,32 +774,40 @@ class PackageCommand extends Command { var parts = path.split("/"); if (parts.length == 1 && parts[0] == "simple") { return Response.ok( - htmlHeader + - wheels.keys - .map((k) => '$k
\n') - .join("") + - htmlFooter, - headers: {"Content-Type": "text/html"}); + htmlHeader + + wheels.keys + .map((k) => '$k
\n') + .join("") + + htmlFooter, + headers: {"Content-Type": "text/html"}, + ); } else if (parts.length == 2 && parts[0] == "simple") { List links = []; wheels.forEach((k, p) { if (k == parts[1].toLowerCase()) { links.add( - "${p['file_name']}
"); + "${p['file_name']}
", + ); } }); - return Response.ok(htmlHeader + links.join("\n") + htmlFooter, - headers: {"Content-Type": "text/html"}); + return Response.ok( + htmlHeader + links.join("\n") + htmlFooter, + headers: {"Content-Type": "text/html"}, + ); } else { return Response.ok('Request for "${request.url}"'); } } - var handler = - const Pipeline().addMiddleware(logRequests()).addHandler(serveRequest); + var handler = const Pipeline() + .addMiddleware(logRequests()) + .addHandler(serveRequest); - var server = - await shelf_io.serve(handler, '127.0.0.1', await getUnusedPort()); + var server = await shelf_io.serve( + handler, + '127.0.0.1', + await getUnusedPort(), + ); // Enable content compression server.autoCompress = true; diff --git a/src/serious_python/example/flask_example/app/app.zip.hash b/src/serious_python/example/flask_example/app/app.zip.hash index 7099c3a9..293ce40f 100644 --- a/src/serious_python/example/flask_example/app/app.zip.hash +++ b/src/serious_python/example/flask_example/app/app.zip.hash @@ -1 +1 @@ -9abed4a7d914300e2cf342c04e7dfcf58a5dbda44fc93a99a86b0e8831207840 \ No newline at end of file +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/src/serious_python/example/flask_example/pubspec.lock b/src/serious_python/example/flask_example/pubspec.lock index 260ed69f..c2fe1546 100644 --- a/src/serious_python/example/flask_example/pubspec.lock +++ b/src/serious_python/example/flask_example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.7" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.7.0" async: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" file: dependency: transitive description: @@ -106,10 +106,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "6.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -127,50 +127,50 @@ packages: dependency: "direct main" description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.5.0" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "6.0.0" matcher: dependency: transitive description: @@ -207,26 +207,26 @@ packages: dependency: transitive description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.20" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.3" path_provider_linux: dependency: transitive description: @@ -255,18 +255,18 @@ packages: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.1.0" platform: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -275,56 +275,64 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + posix: + dependency: transitive + description: + name: posix + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" + url: "https://pub.dev" + source: hosted + version: "6.0.3" serious_python: dependency: "direct main" description: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" shelf: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" sky_engine: dependency: transitive description: flutter @@ -374,58 +382,58 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" toml: dependency: transitive description: name: toml - sha256: "9968de24e45b632bf1a654fe1ac7b6fe5261c349243df83fd262397799c45a2d" + sha256: d968d149c8bd06dc14e09ea3a140f90a3f2ba71949e7a91df4a46f3107400e71 url: "https://pub.dev" source: hosted - version: "0.15.0" + version: "0.16.0" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" url: "https://pub.dev" source: hosted - version: "15.0.0" + version: "15.0.2" web: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" xdg_directories: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" sdks: - dart: ">=3.7.0-0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.35.0" diff --git a/src/serious_python/example/flask_example/pubspec.yaml b/src/serious_python/example/flask_example/pubspec.yaml index f82685f5..9e2fb38d 100644 --- a/src/serious_python/example/flask_example/pubspec.yaml +++ b/src/serious_python/example/flask_example/pubspec.yaml @@ -19,8 +19,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=3.0.3 <4.0.0" - flutter: ">=3.7.0" + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -38,7 +38,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 + cupertino_icons: ^1.0.8 http: ^1.1.2 dev_dependencies: @@ -50,7 +50,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec diff --git a/src/serious_python/example/flask_example/requirements.txt b/src/serious_python/example/flask_example/requirements.txt new file mode 100644 index 00000000..8ab6294c --- /dev/null +++ b/src/serious_python/example/flask_example/requirements.txt @@ -0,0 +1 @@ +flask \ No newline at end of file diff --git a/src/serious_python/example/flask_example/windows/flutter/CMakeLists.txt b/src/serious_python/example/flask_example/windows/flutter/CMakeLists.txt index 930d2071..903f4899 100644 --- a/src/serious_python/example/flask_example/windows/flutter/CMakeLists.txt +++ b/src/serious_python/example/flask_example/windows/flutter/CMakeLists.txt @@ -10,6 +10,11 @@ include(${EPHEMERAL_DIR}/generated_config.cmake) # https://github.com/flutter/flutter/issues/57146. set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") +# Set fallback configurations for older versions of the flutter tool. +if (NOT DEFINED FLUTTER_TARGET_PLATFORM) + set(FLUTTER_TARGET_PLATFORM "windows-x64") +endif() + # === Flutter Library === set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") @@ -92,7 +97,7 @@ add_custom_command( COMMAND ${CMAKE_COMMAND} -E env ${FLUTTER_TOOL_ENVIRONMENT} "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" - windows-x64 $ + ${FLUTTER_TARGET_PLATFORM} $ VERBATIM ) add_custom_target(flutter_assemble DEPENDS diff --git a/src/serious_python/example/flet_example/app/app.zip.hash b/src/serious_python/example/flet_example/app/app.zip.hash index a846e48f..293ce40f 100644 --- a/src/serious_python/example/flet_example/app/app.zip.hash +++ b/src/serious_python/example/flet_example/app/app.zip.hash @@ -1 +1 @@ -43f8a7b00e44a09647dda36299259976950ba7259c5060de20677c449690fc73 \ No newline at end of file +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/src/serious_python/example/flet_example/pubspec.lock b/src/serious_python/example/flet_example/pubspec.lock deleted file mode 100644 index 01e6f551..00000000 --- a/src/serious_python/example/flet_example/pubspec.lock +++ /dev/null @@ -1,920 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - archive: - dependency: transitive - description: - name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d - url: "https://pub.dev" - source: hosted - version: "3.6.1" - args: - dependency: transitive - description: - name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" - url: "https://pub.dev" - source: hosted - version: "2.5.0" - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - cross_file: - dependency: transitive - description: - name: cross_file - sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" - url: "https://pub.dev" - source: hosted - version: "0.3.4+2" - crypto: - dependency: transitive - description: - name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 - url: "https://pub.dev" - source: hosted - version: "3.0.5" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - dbus: - dependency: transitive - description: - name: dbus - sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" - url: "https://pub.dev" - source: hosted - version: "0.7.11" - device_info_plus: - dependency: transitive - description: - name: device_info_plus - sha256: "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da" - url: "https://pub.dev" - source: hosted - version: "11.3.0" - device_info_plus_platform_interface: - dependency: transitive - description: - name: device_info_plus_platform_interface - sha256: "0b04e02b30791224b31969eb1b50d723498f402971bff3630bca2ba839bd1ed2" - url: "https://pub.dev" - source: hosted - version: "7.0.2" - equatable: - dependency: transitive - description: - name: equatable - sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2 - url: "https://pub.dev" - source: hosted - version: "2.0.5" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - ffi: - dependency: transitive - description: - name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" - url: "https://pub.dev" - source: hosted - version: "2.1.3" - file: - dependency: transitive - description: - name: file - sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 - url: "https://pub.dev" - source: hosted - version: "7.0.1" - file_picker: - dependency: transitive - description: - name: file_picker - sha256: e7e16c9d15c36330b94ca0e2ad8cb61f93cd5282d0158c09805aed13b5452f22 - url: "https://pub.dev" - source: hosted - version: "10.3.2" - fl_chart: - dependency: transitive - description: - name: fl_chart - sha256: "74959b99b92b9eebeed1a4049426fd67c4abc3c5a0f4d12e2877097d6a11ae08" - url: "https://pub.dev" - source: hosted - version: "0.69.2" - flet: - dependency: "direct main" - description: - name: flet - sha256: "3be85b7d2e70e00d957966a7bcec2b290057d440b7aafd795a197a39ab3783cf" - url: "https://pub.dev" - source: hosted - version: "0.28.3" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_driver: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - flutter_highlight: - dependency: transitive - description: - name: flutter_highlight - sha256: "7b96333867aa07e122e245c033b8ad622e4e3a42a1a2372cbb098a2541d8782c" - url: "https://pub.dev" - source: hosted - version: "0.7.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 - url: "https://pub.dev" - source: hosted - version: "2.0.3" - flutter_localizations: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - flutter_markdown: - dependency: transitive - description: - name: flutter_markdown - sha256: f0e599ba89c9946c8e051780f0ec99aba4ba15895e0380a7ab68f420046fc44e - url: "https://pub.dev" - source: hosted - version: "0.7.4+1" - flutter_plugin_android_lifecycle: - dependency: transitive - description: - name: flutter_plugin_android_lifecycle - sha256: "9ee02950848f61c4129af3d6ec84a1cfc0e47931abc746b03e7a3bc3e8ff6eda" - url: "https://pub.dev" - source: hosted - version: "2.0.22" - flutter_redux: - dependency: transitive - description: - name: flutter_redux - sha256: "3b20be9e08d0038e1452fbfa1fdb1ea0a7c3738c997734530b3c6d0bb5fcdbdc" - url: "https://pub.dev" - source: hosted - version: "0.10.0" - flutter_svg: - dependency: transitive - description: - name: flutter_svg - sha256: c200fd79c918a40c5cd50ea0877fa13f81bdaf6f0a5d3dbcc2a13e3285d6aa1b - url: "https://pub.dev" - source: hosted - version: "2.0.17" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - fuchsia_remote_debug_protocol: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - glob: - dependency: transitive - description: - name: glob - sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de - url: "https://pub.dev" - source: hosted - version: "2.1.3" - highlight: - dependency: transitive - description: - name: highlight - sha256: "5353a83ffe3e3eca7df0abfb72dcf3fa66cc56b953728e7113ad4ad88497cf21" - url: "https://pub.dev" - source: hosted - version: "0.7.0" - http: - dependency: transitive - description: - name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 - url: "https://pub.dev" - source: hosted - version: "1.2.2" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - integration_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - intl: - dependency: transitive - description: - name: intl - sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" - url: "https://pub.dev" - source: hosted - version: "0.20.2" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - json_annotation: - dependency: transitive - description: - name: json_annotation - sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" - url: "https://pub.dev" - source: hosted - version: "4.9.0" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" - url: "https://pub.dev" - source: hosted - version: "10.0.9" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - url: "https://pub.dev" - source: hosted - version: "3.0.9" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - lints: - dependency: transitive - description: - name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - logging: - dependency: transitive - description: - name: logging - sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" - url: "https://pub.dev" - source: hosted - version: "1.2.0" - markdown: - dependency: transitive - description: - name: markdown - sha256: ef2a1298144e3f985cc736b22e0ccdaf188b5b3970648f2d9dc13efd1d9df051 - url: "https://pub.dev" - source: hosted - version: "7.2.2" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - package_info_plus: - dependency: "direct main" - description: - name: package_info_plus - sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 - url: "https://pub.dev" - source: hosted - version: "8.0.2" - package_info_plus_platform_interface: - dependency: transitive - description: - name: package_info_plus_platform_interface - sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 - url: "https://pub.dev" - source: hosted - version: "3.0.1" - path: - dependency: "direct main" - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path_parsing: - dependency: transitive - description: - name: path_parsing - sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf - url: "https://pub.dev" - source: hosted - version: "1.0.1" - path_provider: - dependency: "direct main" - description: - name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 - url: "https://pub.dev" - source: hosted - version: "2.1.4" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" - url: "https://pub.dev" - source: hosted - version: "2.2.10" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 - url: "https://pub.dev" - source: hosted - version: "2.4.0" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - petitparser: - dependency: transitive - description: - name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 - url: "https://pub.dev" - source: hosted - version: "6.0.2" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.dev" - source: hosted - version: "3.1.6" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - process: - dependency: transitive - description: - name: process - sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" - url: "https://pub.dev" - source: hosted - version: "5.0.3" - redux: - dependency: transitive - description: - name: redux - sha256: "1e86ed5b1a9a717922d0a0ca41f9bf49c1a587d50050e9426fc65b14e85ec4d7" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - screen_retriever: - dependency: transitive - description: - name: screen_retriever - sha256: "570dbc8e4f70bac451e0efc9c9bb19fa2d6799a11e6ef04f946d7886d2e23d0c" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - screen_retriever_linux: - dependency: transitive - description: - name: screen_retriever_linux - sha256: f7f8120c92ef0784e58491ab664d01efda79a922b025ff286e29aa123ea3dd18 - url: "https://pub.dev" - source: hosted - version: "0.2.0" - screen_retriever_macos: - dependency: transitive - description: - name: screen_retriever_macos - sha256: "71f956e65c97315dd661d71f828708bd97b6d358e776f1a30d5aa7d22d78a149" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - screen_retriever_platform_interface: - dependency: transitive - description: - name: screen_retriever_platform_interface - sha256: ee197f4581ff0d5608587819af40490748e1e39e648d7680ecf95c05197240c0 - url: "https://pub.dev" - source: hosted - version: "0.2.0" - screen_retriever_windows: - dependency: transitive - description: - name: screen_retriever_windows - sha256: "449ee257f03ca98a57288ee526a301a430a344a161f9202b4fcc38576716fe13" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - sensors_plus: - dependency: transitive - description: - name: sensors_plus - sha256: "8e7fa79b4940442bb595bfc0ee9da4af5a22a0fe6ebacc74998245ee9496a82d" - url: "https://pub.dev" - source: hosted - version: "4.0.2" - sensors_plus_platform_interface: - dependency: transitive - description: - name: sensors_plus_platform_interface - sha256: bc472d6cfd622acb4f020e726433ee31788b038056691ba433fec80e448a094f - url: "https://pub.dev" - source: hosted - version: "1.2.0" - serious_python: - dependency: "direct main" - description: - path: "../.." - relative: true - source: path - version: "0.9.3" - serious_python_android: - dependency: transitive - description: - path: "../../../serious_python_android" - relative: true - source: path - version: "0.9.3" - serious_python_darwin: - dependency: transitive - description: - path: "../../../serious_python_darwin" - relative: true - source: path - version: "0.9.3" - serious_python_linux: - dependency: transitive - description: - path: "../../../serious_python_linux" - relative: true - source: path - version: "0.9.3" - serious_python_platform_interface: - dependency: transitive - description: - path: "../../../serious_python_platform_interface" - relative: true - source: path - version: "0.9.3" - serious_python_windows: - dependency: transitive - description: - path: "../../../serious_python_windows" - relative: true - source: path - version: "0.9.3" - shared_preferences: - dependency: transitive - description: - name: shared_preferences - sha256: "746e5369a43170c25816cc472ee016d3a66bc13fcf430c0bc41ad7b4b2922051" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_android: - dependency: transitive - description: - name: shared_preferences_android - sha256: "480ba4345773f56acda9abf5f50bd966f581dac5d514e5fc4a18c62976bbba7e" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - shared_preferences_foundation: - dependency: transitive - description: - name: shared_preferences_foundation - sha256: c4b35f6cb8f63c147312c054ce7c2254c8066745125264f0c88739c417fc9d9f - url: "https://pub.dev" - source: hosted - version: "2.5.2" - shared_preferences_linux: - dependency: transitive - description: - name: shared_preferences_linux - sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_platform_interface: - dependency: transitive - description: - name: shared_preferences_platform_interface - sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shared_preferences_web: - dependency: transitive - description: - name: shared_preferences_web - sha256: d2ca4132d3946fec2184261726b355836a82c33d7d5b67af32692aff18a4684e - url: "https://pub.dev" - source: hosted - version: "2.4.2" - shared_preferences_windows: - dependency: transitive - description: - name: shared_preferences_windows - sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" - url: "https://pub.dev" - source: hosted - version: "2.4.1" - shelf: - dependency: transitive - description: - name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 - url: "https://pub.dev" - source: hosted - version: "1.4.1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - sync_http: - dependency: transitive - description: - name: sync_http - sha256: "7f0cd72eca000d2e026bcd6f990b81d0ca06022ef4e32fb257b30d3d1014a961" - url: "https://pub.dev" - source: hosted - version: "0.3.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - url: "https://pub.dev" - source: hosted - version: "0.7.4" - toml: - dependency: transitive - description: - name: toml - sha256: "9968de24e45b632bf1a654fe1ac7b6fe5261c349243df83fd262397799c45a2d" - url: "https://pub.dev" - source: hosted - version: "0.15.0" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c - url: "https://pub.dev" - source: hosted - version: "1.3.2" - url_launcher: - dependency: transitive - description: - name: url_launcher - sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603" - url: "https://pub.dev" - source: hosted - version: "6.3.1" - url_launcher_android: - dependency: transitive - description: - name: url_launcher_android - sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 - url: "https://pub.dev" - source: hosted - version: "6.3.9" - url_launcher_ios: - dependency: transitive - description: - name: url_launcher_ios - sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e - url: "https://pub.dev" - source: hosted - version: "6.3.1" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af - url: "https://pub.dev" - source: hosted - version: "3.2.0" - url_launcher_macos: - dependency: transitive - description: - name: url_launcher_macos - sha256: "769549c999acdb42b8bcfa7c43d72bf79a382ca7441ab18a808e101149daf672" - url: "https://pub.dev" - source: hosted - version: "3.2.1" - url_launcher_platform_interface: - dependency: transitive - description: - name: url_launcher_platform_interface - sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" - url: "https://pub.dev" - source: hosted - version: "2.3.2" - url_launcher_web: - dependency: transitive - description: - name: url_launcher_web - sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" - url: "https://pub.dev" - source: hosted - version: "2.3.3" - url_launcher_windows: - dependency: transitive - description: - name: url_launcher_windows - sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" - url: "https://pub.dev" - source: hosted - version: "3.1.2" - url_strategy: - dependency: "direct main" - description: - name: url_strategy - sha256: "42b68b42a9864c4d710401add17ad06e28f1c1d5500c93b98c431f6b0ea4ab87" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - vector_graphics: - dependency: transitive - description: - name: vector_graphics - sha256: "44cc7104ff32563122a929e4620cf3efd584194eec6d1d913eb5ba593dbcf6de" - url: "https://pub.dev" - source: hosted - version: "1.1.18" - vector_graphics_codec: - dependency: transitive - description: - name: vector_graphics_codec - sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da - url: "https://pub.dev" - source: hosted - version: "1.1.11+1" - vector_graphics_compiler: - dependency: transitive - description: - name: vector_graphics_compiler - sha256: "1b4b9e706a10294258727674a340ae0d6e64a7231980f9f9a3d12e4b42407aad" - url: "https://pub.dev" - source: hosted - version: "1.1.16" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 - url: "https://pub.dev" - source: hosted - version: "15.0.0" - web: - dependency: transitive - description: - name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb - url: "https://pub.dev" - source: hosted - version: "1.1.0" - web_socket_channel: - dependency: transitive - description: - name: web_socket_channel - sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b - url: "https://pub.dev" - source: hosted - version: "2.4.0" - webdriver: - dependency: transitive - description: - name: webdriver - sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" - url: "https://pub.dev" - source: hosted - version: "3.1.0" - win32: - dependency: transitive - description: - name: win32 - sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba" - url: "https://pub.dev" - source: hosted - version: "5.13.0" - win32_registry: - dependency: transitive - description: - name: win32_registry - sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" - url: "https://pub.dev" - source: hosted - version: "1.1.5" - window_manager: - dependency: transitive - description: - name: window_manager - sha256: "732896e1416297c63c9e3fb95aea72d0355f61390263982a47fd519169dc5059" - url: "https://pub.dev" - source: hosted - version: "0.4.3" - window_to_front: - dependency: transitive - description: - name: window_to_front - sha256: "7aef379752b7190c10479e12b5fd7c0b9d92adc96817d9e96c59937929512aee" - url: "https://pub.dev" - source: hosted - version: "0.0.3" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d - url: "https://pub.dev" - source: hosted - version: "1.0.4" - xml: - dependency: transitive - description: - name: xml - sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 - url: "https://pub.dev" - source: hosted - version: "6.5.0" -sdks: - dart: ">=3.7.0 <4.0.0" - flutter: ">=3.22.0" diff --git a/src/serious_python/example/flet_example/pubspec.yaml b/src/serious_python/example/flet_example/pubspec.yaml index 31425e65..81f06b6f 100644 --- a/src/serious_python/example/flet_example/pubspec.yaml +++ b/src/serious_python/example/flet_example/pubspec.yaml @@ -19,8 +19,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=3.0.3 <4.0.0" - flutter: ">=3.7.0" + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -31,20 +31,20 @@ environment: dependencies: flutter: sdk: flutter - serious_python: path: ../../ - - flet: ^0.28.3 - - path: ^1.8.3 + flet: + git: + url: https://github.com/flet-dev/flet.git + path: packages/flet + path: ^1.9.1 url_strategy: ^0.2.0 - path_provider: ^2.1.4 - package_info_plus: ^8.0.2 + path_provider: ^2.1.5 + package_info_plus: ^9.0.0 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 + cupertino_icons: ^1.0.8 dev_dependencies: flutter_test: @@ -55,7 +55,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 integration_test: sdk: flutter diff --git a/src/serious_python/example/run_example/app/app.zip.hash b/src/serious_python/example/run_example/app/app.zip.hash index 615dadf3..293ce40f 100644 --- a/src/serious_python/example/run_example/app/app.zip.hash +++ b/src/serious_python/example/run_example/app/app.zip.hash @@ -1 +1 @@ -2b009202b20832851c62f09fd3dc603131d9efa45da27efb94eb21b32da28ed0 \ No newline at end of file +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 \ No newline at end of file diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index d614cac1..18da7d47 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: archive - sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" url: "https://pub.dev" source: hosted - version: "3.6.1" + version: "4.0.7" args: dependency: transitive description: name: args - sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.5.0" + version: "2.7.0" async: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: transitive description: name: crypto - sha256: ec30d999af904f33454ba22ed9a86162b35e52b44ac4807d1d93c288041d7d27 + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" cupertino_icons: dependency: "direct main" description: @@ -85,10 +85,10 @@ packages: dependency: transitive description: name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" file: dependency: transitive description: @@ -111,10 +111,10 @@ packages: dependency: "direct dev" description: name: flutter_lints - sha256: a25a15ebbdfc33ab1cd26c63a6ee519df92338a9c10f122adda92938253bef04 + sha256: "3105dc8492f6183fb076ccf1f351ac3d60564bff92e20bfc4af9cc1651f4e7e1" url: "https://pub.dev" source: hosted - version: "2.0.3" + version: "6.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -137,18 +137,18 @@ packages: dependency: transitive description: name: http - sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.5.0" http_parser: dependency: transitive description: name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.1.2" integration_test: dependency: "direct dev" description: flutter @@ -158,34 +158,34 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" url: "https://pub.dev" source: hosted - version: "10.0.9" + version: "11.0.2" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" url: "https://pub.dev" source: hosted - version: "3.0.9" + version: "3.0.10" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "3.0.2" lints: dependency: transitive description: name: lints - sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452" + sha256: a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "6.0.0" matcher: dependency: transitive description: @@ -222,26 +222,26 @@ packages: dependency: "direct main" description: name: path_provider - sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.1.5" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "6f01f8e37ec30b07bc424b4deabac37cacb1bc7e2e515ad74486039918a37eb7" + sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 url: "https://pub.dev" source: hosted - version: "2.2.10" + version: "2.2.20" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 + sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738 url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.3" path_provider_linux: dependency: transitive description: @@ -270,10 +270,10 @@ packages: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.1.0" platform: dependency: transitive description: @@ -290,64 +290,72 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.8" + posix: + dependency: transitive + description: + name: posix + sha256: "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61" + url: "https://pub.dev" + source: hosted + version: "6.0.3" process: dependency: transitive description: name: process - sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" + sha256: c6248e4526673988586e8c00bb22a49210c258dc91df5227d5da9748ecf79744 url: "https://pub.dev" source: hosted - version: "5.0.3" + version: "5.0.5" serious_python: dependency: "direct main" description: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4+1" shelf: dependency: transitive description: name: shelf - sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 url: "https://pub.dev" source: hosted - version: "1.4.1" + version: "1.4.2" sky_engine: dependency: transitive description: flutter @@ -405,50 +413,50 @@ packages: dependency: transitive description: name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" url: "https://pub.dev" source: hosted - version: "0.7.4" + version: "0.7.6" toml: dependency: transitive description: name: toml - sha256: "9968de24e45b632bf1a654fe1ac7b6fe5261c349243df83fd262397799c45a2d" + sha256: d968d149c8bd06dc14e09ea3a140f90a3f2ba71949e7a91df4a46f3107400e71 url: "https://pub.dev" source: hosted - version: "0.15.0" + version: "0.16.0" typed_data: dependency: transitive description: name: typed_data - sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.4.0" vector_math: dependency: transitive description: name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b url: "https://pub.dev" source: hosted - version: "2.1.4" + version: "2.2.0" vm_service: dependency: transitive description: name: vm_service - sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" url: "https://pub.dev" source: hosted - version: "15.0.0" + version: "15.0.2" web: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" webdriver: dependency: transitive description: @@ -461,10 +469,10 @@ packages: dependency: transitive description: name: xdg_directories - sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.1.0" sdks: - dart: ">=3.7.0-0 <4.0.0" - flutter: ">=3.22.0" + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.35.0" diff --git a/src/serious_python/example/run_example/pubspec.yaml b/src/serious_python/example/run_example/pubspec.yaml index 6e186c10..3ca643a3 100644 --- a/src/serious_python/example/run_example/pubspec.yaml +++ b/src/serious_python/example/run_example/pubspec.yaml @@ -19,7 +19,8 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: '>=3.1.3 <4.0.0' + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' # Dependencies specify other packages that your package needs in order to work. # To automatically upgrade your package dependencies to the latest versions @@ -34,12 +35,12 @@ dependencies: serious_python: path: ../../ - path_provider: ^2.0.15 - path: ^1.8.3 + path_provider: ^2.1.5 + path: ^1.9.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 + cupertino_icons: ^1.0.8 dev_dependencies: flutter_test: @@ -50,7 +51,7 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 integration_test: sdk: flutter diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 732cee5f..e880db5f 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python description: A cross-platform plugin for adding embedded Python runtime to your Flutter apps. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.4 +version: 0.9.4+1 platforms: ios: @@ -11,9 +11,11 @@ platforms: windows: linux: +resolution: workspace + environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.7.0" + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' flutter: plugin: @@ -43,18 +45,18 @@ dependencies: serious_python_linux: path: ../serious_python_linux - path_provider: ^2.1.3 - archive: ^3.6.1 - path: ^1.9.0 - args: ^2.5.0 - toml: ^0.15.0 - http: ^1.2.1 - shelf: ^1.4.1 - crypto: ^3.0.5 + path_provider: ^2.1.5 + archive: ^4.0.7 + path: ^1.9.1 + args: ^2.7.0 + toml: ^0.17.0 + http: ^1.5.0 + shelf: ^1.4.2 + crypto: ^3.0.6 glob: ^2.1.3 dev_dependencies: flutter_test: sdk: flutter - plugin_platform_interface: ^2.1.6 - flutter_lints: ^2.0.0 \ No newline at end of file + plugin_platform_interface: ^2.1.8 + flutter_lints: ^6.0.0 \ No newline at end of file diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index 90adfe9c..61884014 100644 --- a/src/serious_python_android/pubspec.yaml +++ b/src/serious_python_android/pubspec.yaml @@ -2,11 +2,13 @@ name: serious_python_android description: Android implementation of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.4 +version: 0.9.4+1 + +resolution: workspace environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.7.0" + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' dependencies: flutter: @@ -14,14 +16,14 @@ dependencies: plugin_platform_interface: ^2.1.8 serious_python_platform_interface: path: ../serious_python_platform_interface - path: ^1.9.0 - ffi: ^2.1.2 + path: ^1.9.1 + ffi: ^2.1.4 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 - ffigen: ^9.0.0 + flutter_lints: ^6.0.0 + ffigen: ^19.1.0 flutter: plugin: diff --git a/src/serious_python_darwin/pubspec.yaml b/src/serious_python_darwin/pubspec.yaml index 655f04c3..6799118a 100644 --- a/src/serious_python_darwin/pubspec.yaml +++ b/src/serious_python_darwin/pubspec.yaml @@ -2,11 +2,13 @@ name: serious_python_darwin description: iOS and macOS implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.4 +version: 0.9.4+1 + +resolution: workspace environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.7.0" + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' dependencies: flutter: @@ -14,12 +16,12 @@ dependencies: plugin_platform_interface: ^2.1.8 serious_python_platform_interface: path: ../serious_python_platform_interface - path: ^1.9.0 + path: ^1.9.1 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 flutter: plugin: diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index b2b22e82..86776c2e 100644 --- a/src/serious_python_linux/pubspec.yaml +++ b/src/serious_python_linux/pubspec.yaml @@ -2,11 +2,13 @@ name: serious_python_linux description: Linux implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.4 +version: 0.9.4+1 + +resolution: workspace environment: - sdk: '>=3.1.3 <4.0.0' - flutter: '>=3.3.0' + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' dependencies: flutter: @@ -18,7 +20,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 flutter: plugin: diff --git a/src/serious_python_platform_interface/lib/src/utils.dart b/src/serious_python_platform_interface/lib/src/utils.dart index e364c4e3..a45e7f34 100644 --- a/src/serious_python_platform_interface/lib/src/utils.dart +++ b/src/serious_python_platform_interface/lib/src/utils.dart @@ -60,9 +60,9 @@ Future extractAssetOrFile(String path, archive = ZipDecoder().decodeBytes(data); } else { final inputStream = InputFileStream(path); - archive = ZipDecoder().decodeBuffer(inputStream); + archive = ZipDecoder().decodeStream(inputStream); } - await extractArchiveToDiskAsync(archive, destDir.path, asyncWrite: true); + await extractArchiveToDisk(archive, destDir.path); } catch (e) { debugPrint("Error unpacking archive: $e"); await destDir.delete(recursive: true); diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index a5428de2..956a5730 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -2,21 +2,23 @@ name: serious_python_platform_interface description: A common platform interface for the serious_python plugin. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.4 +version: 0.9.4+1 + +resolution: workspace environment: - sdk: ">=3.0.0 <4.0.0" - flutter: ">=3.7.0" + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' dependencies: flutter: sdk: flutter plugin_platform_interface: ^2.1.8 - path_provider: ^2.1.3 - archive: ^3.6.1 - path: ^1.9.0 + path_provider: ^2.1.5 + archive: ^4.0.7 + path: ^1.9.1 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 823f9799..10fc1ac6 100644 --- a/src/serious_python_windows/pubspec.yaml +++ b/src/serious_python_windows/pubspec.yaml @@ -2,11 +2,13 @@ name: serious_python_windows description: Windows implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 0.9.4 +version: 0.9.4+1 + +resolution: workspace environment: - sdk: '>=3.1.3 <4.0.0' - flutter: '>=3.3.0' + sdk: '>=3.7.0 < 4.0.0' + flutter: '>=3.27.0' dependencies: flutter: @@ -18,7 +20,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^2.0.0 + flutter_lints: ^6.0.0 flutter: plugin: diff --git a/src/serious_python_windows/windows/CMakeLists.txt b/src/serious_python_windows/windows/CMakeLists.txt index d13a5c11..f0573065 100644 --- a/src/serious_python_windows/windows/CMakeLists.txt +++ b/src/serious_python_windows/windows/CMakeLists.txt @@ -30,6 +30,14 @@ list(APPEND PLUGIN_SOURCES "serious_python_windows_plugin.h" ) +if(MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>DLL") + file(REAL_PATH ${CMAKE_BINARY_DIR}/runner/$ FLUTTER_APP_DIR) + set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ${FLUTTER_APP_DIR}) +endif() + +include(InstallRequiredSystemLibraries) + # Define the plugin library target. Its name must not be changed (see comment # on PLUGIN_NAME above). add_library(${PLUGIN_NAME} SHARED @@ -71,9 +79,6 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE set(serious_python_windows_bundled_libraries "${PYTHON_PACKAGE}/python312$<$:_d>.dll" "${PYTHON_PACKAGE}/python3$<$:_d>.dll" - "$ENV{WINDIR}/system32/msvcp140.dll" - "$ENV{WINDIR}/system32/vcruntime140.dll" - "$ENV{WINDIR}/system32/vcruntime140_1.dll" PARENT_SCOPE ) @@ -88,15 +93,17 @@ add_custom_command(TARGET CopyPythonDLLs POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory "${PYTHON_PACKAGE}/DLLs" "${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs" - COMMAND IF \"$<$:release>\" == \"release\" DEL \"${CMAKE_BINARY_DIR}/runner/Release/DLLs\\*_d.*\" /S /Q - COMMAND DEL \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\*.ico\" /S /Q - COMMAND DEL \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\*.cat\" /S /Q - COMMAND DEL \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\tcl86t.dll\" /Q - COMMAND DEL \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\tk86t.dll\" /Q + COMMAND IF \"$\" == \"1\" (DEL /S /Q \"${CMAKE_BINARY_DIR}/runner/Release/DLLs\\*_d.*\") + COMMAND DEL /S /Q \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\*.ico\" + COMMAND DEL /S /Q \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\*.cat\" + COMMAND DEL /Q \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\tcl86t.dll\" + COMMAND DEL /Q \"${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/DLLs\\tk86t.dll\" ) if(DEFINED ENV{SERIOUS_PYTHON_SITE_PACKAGES}) - add_custom_command(TARGET CopyPythonDLLs POST_BUILD + add_custom_target(CopySitePackages ALL) + add_dependencies(CopySitePackages CopyPythonDLLs) + add_custom_command(TARGET CopySitePackages POST_BUILD COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}/runner/$<$:Release>$<$:Debug>/site-packages" COMMAND ${CMAKE_COMMAND} -E make_directory