-
-
Notifications
You must be signed in to change notification settings - Fork 695
Open
Description
The recent integration of MaterialShapes has introduced a hidden, non-Pythonic dependency chain that breaks KivyMD’s cross-platform compatibility—specifically for Android and Windows.
MaterialShapes now depends on pycairo, which requires the Cairo graphics library (a binary C-extension) to be installed on the host system.
The Issue for KivyMD
- Android (Blocking): There is no
python-for-android(p4a) recipe forcairo. Consequently,buildozerfails to package the APK because it cannot cross-compile the Cairo C-headers for ARM. This makes the current Master branch unusable for mobile development. - Windows/macOS: Standard
pip installfails unless the user manually installs the Cairo binary and configures system environment variables. This violates KivyMD's "well-behaved package" standard. - Architectural Regression: KivyMD has traditionally avoided system-level dependencies that aren't bundled in wheels or handled by p4a recipes. This change introduces a "Linux-only" constraint to the core library.
Evidence
When building for Android or installing on a clean Windows environment, the process crashes during the pycairo setup:
Error: pkg-config --exists 'cairo >= 1.15.10' returned non-zero exit status 1
Suggested Action
- Revert/Modify MaterialShapes: Request that the
MaterialShapesmaintainer remove the Cairo dependency in favor of a Pure-Python solution (likePillow) or Kivy’s nativeCanvasinstructions. - Dependency Shielding: If MaterialShapes cannot be fixed, it should be treated as an optional extra or replaced to ensure the KivyMD core remains installable via
pipon all platforms.