build-cython-ext

Build and install legacy Cython extensions with NumPy 2.0 compatibility fixes.

13|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/phenobarbital/antigravity-config --skill build-cython-ext-phenobarbital
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-cython-ext
Source: https://github.com/phenobarbital/antigravity-config/tree/main/backend/.agent/skills/cython-extensions
Command: npx skills add https://github.com/phenobarbital/antigravity-config --skill build-cython-ext-phenobarbital

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

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.

Frequently Asked Questions about build-cython-ext

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix Cython extension build failures caused by NumPy 2.0 deprecations?

To fix Cython extension build failures from NumPy 2.0 deprecations, migrate deprecated type aliases such as np.float to np.float64 and update Cython declarations for modern NumPy types during a pre-build analysis phase.

What is the best way to build legacy Cython extensions for Python 3.x compatibility?

The best way to build legacy Cython extensions for Python 3.x compatibility is to run a pre-build inventory of compatibility issues, apply systematic Python 2/3 pattern migrations in .pyx sources, then clean and install with pip.

Why does my setup.py Cython build fail after upgrading NumPy?

Your setup.py Cython build fails after upgrading NumPy because legacy code often references deprecated NumPy types and aliases that were removed in NumPy 2.0, requiring structured type migration before compilation.

Can I install Cython extensions directly to my system Python environment?

Yes, you can install Cython extensions directly to your system Python environment by cleaning previous build artifacts, compiling the package, and performing a robust system-wide installation using pip.

How do I avoid repeated build-fail-fix cycles when compiling Cython extensions?

To avoid repeated build-fail-fix cycles when compiling Cython extensions, conduct a comprehensive pre-build analysis to inventory deprecated NumPy types and Python 3.x compatibility patterns across .py and .pyx sources before attempting compilation.