rename pkpy to pocket

This commit is contained in:
blueloveTH 2024-10-20 00:01:24 +08:00
parent 9d02931c11
commit 4ebe09fc82
3 changed files with 4 additions and 4 deletions

View File

@ -19,14 +19,14 @@ class MyApp extends StatefulWidget {
class _MyAppState extends State<MyApp> { class _MyAppState extends State<MyApp> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
bool ok = pkpy.py_exec( bool ok = pocket.py_exec(
'import sys\nprint(sys.version)'.toNativeUtf8().cast(), 'import sys\nprint(sys.version)'.toNativeUtf8().cast(),
'main.py'.toNativeUtf8().cast(), 'main.py'.toNativeUtf8().cast(),
py_CompileMode.EXEC_MODE, py_CompileMode.EXEC_MODE,
Pointer.fromAddress(0)); Pointer.fromAddress(0));
if (!ok) { if (!ok) {
pkpy.py_printexc(); pocket.py_printexc();
} }
return MaterialApp( return MaterialApp(

View File

@ -11,7 +11,7 @@ void flutterPrint(Pointer<Char> text) {
print(text.cast<Utf8>().toDartString()); print(text.cast<Utf8>().toDartString());
} }
final PocketpyBindings pkpy = () { final PocketpyBindings pocket = () {
DynamicLibrary dylib; DynamicLibrary dylib;
if (Platform.isMacOS || Platform.isIOS) { if (Platform.isMacOS || Platform.isIOS) {
dylib = DynamicLibrary.open('$_libName.framework/$_libName'); dylib = DynamicLibrary.open('$_libName.framework/$_libName');

View File

@ -1,6 +1,6 @@
name: pocketpy name: pocketpy
description: A lightweight Python interpreter for game engines. It supports Android/iOS/Windows/Linux/MacOS. description: A lightweight Python interpreter for game engines. It supports Android/iOS/Windows/Linux/MacOS.
version: 2.0.1+5 version: 2.0.1+6
homepage: https://pocketpy.dev homepage: https://pocketpy.dev
repository: https://github.com/pocketpy/pocketpy repository: https://github.com/pocketpy/pocketpy