-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Recent updates have introduced a hard dependency on pycairo. While pycairo is a Python package, it is a wrapper for the Cairo graphics library (a binary C-extension). This introduces several critical issues that prevent this library from being "well-behaved" in a cross-platform ecosystem like Kivy/KivyMD:
Android Failure: pycairo requires a native C-library that does not have a standard recipe in python-for-android (p4a). This makes it impossible to package any application using MaterialShapes into an APK via Buildozer.
Windows/macOS Friction: Users on these platforms must manually install Cairo binaries and configure system environment variables (like PKG_CONFIG_PATH) for pip install to succeed.
Hidden Dependencies: The requirement for a system-level binary is currently undocumented, leading to cryptic build errors during installation.
Impact on KivyMD
Since KivyMD (Master) now depends on MaterialShapes, this dependency has inadvertently platform-locked the entire KivyMD master branch to Desktop Linux. Mobile developers (Android/iOS) and Windows users are currently unable to use the latest version of the toolkit.
Suggested Solutions
To restore the "Pure Python" and cross-platform nature of the package, please consider one of the following:
Remove Cairo Dependency: Replace Cairo with a library that provides pre-compiled wheels (e.g., Pillow) or use Kivy’s native Canvas instructions if the target is Kivy-centric.
Documentation: If Cairo remains a requirement, the README must explicitly state the necessary system-level C-packages required for each OS.
Technical Environment (for reproduction)
Target OS: Android (via Buildozer/p4a), Windows 10/11.
Error encountered: pkg-config --exists 'cairo >= 1.15.10' returned non-zero exit status 1.