What problem does it solve?
This skill provides systematic approaches for building Cython extension packages, with emphasis on resolving compatibility issues that arise with modern Python and NumPy versions.
Core Features & Use Cases
- Phase 1: Pre-Build Analysis: Conduct a comprehensive inventory of potential compatibility issues BEFORE attempting to build. This proactive approach prevents the inefficient cycle of build-fail-fix-rebuild and includes checks for deprecated NumPy types and Python 3.x compatibility patterns across .py and .pyx sources.
- Phase 2: Systematic Fixes: Apply broad migrations for deprecated NumPy aliases (np.float -> np.float64, np.int -> np.int64, np.complex -> np.complex128, etc.), update Python 2/3 compatibility patterns, and prepare Cython declarations for modern NumPy types.
- Phase 3: Build and Install: Clean previous artifacts, build, and install with pip, ensuring a proper global or system-wide installation.
- The content may also reference reference materials and testing considerations.
Quick Start
Run a pre-build analysis, then perform a clean build and install of the Cython extension.