python_ffi_cpython
MacOS, Windows and Linux implementation of the python_ffi
plugin. As such, this package is compatible with Flutter apps.
Development of this package
Preparing the dylib for bundled distribution
- On macOS, install
pkg-config
on your system:brew install pkg-config
. - Run
dart run scripts/bin/scripts.dart cpython all
to compile the Python dynamic library for the current platform. This creates acpython
folder in the root of this package with the compiled dynamic library (libpython<version>.dylib
/libpython<version>.so
). - Copy the dynamic library to the
macos
,windows
orlinux
folder, depending on the platform you're targeting.
Extra steps on macOS
- Add the path to the dynamic library (inside the
macos
folder) tos.vendored_libraries
inmacos/python_ffi_cpython.podspec
.