Agent skill
python-packaging-env-finder
Investigate environment variables that can be set when building Python wheels for a given project. Analyzes setup.py, CMake files, and other build configuration files to discover customizable build environment variables.
Install this agent skill to your Project
npx add-skill https://github.com/opendatahub-io/ai-helpers/tree/main/helpers/skills/python-packaging-env-finder
SKILL.md
Python Build Environment Variables Investigation
This skill helps you discover all environment variables that can be set when building Python wheels for a project. It performs a comprehensive analysis of build configuration files to identify customizable environment variables used during the wheel building process.
Instructions
When a user asks about environment variables for building Python wheels, investigating build configuration, or understanding build customization options:
-
Run the Environment Variables Investigation Script:
bash./scripts/env_finder.py [project_path] -
Analyze and present the findings focusing on:
Build Configuration Variables
- Setup.py Variables: Environment variables used in setup.py for customizing builds
- CMake Variables: Variables defined in CMakeLists.txt and related files
- Build Tool Variables: Variables used by setuptools, distutils, or other build systems
- Compiler Variables: Variables affecting compilation (CC, CXX, CFLAGS, etc.)
Variable Categories
Compiler and Linker Variables
CC,CXX- Compiler selectionCFLAGS,CXXFLAGS- Compilation flagsLDFLAGS- Linker flagsLIBS- Additional libraries
Path Configuration Variables
PREFIX- Installation prefixLIBRARY_PATH- Library search pathsINCLUDE_PATH- Header file pathsPKG_CONFIG_PATH- pkg-config search paths
Feature Control Variables
ENABLE_*- Feature enable/disable flagsWITH_*- Optional component inclusionUSE_*- Build option selectionDISABLE_*- Feature disable flags
Python-Specific Variables
PYTHON_INCLUDE_DIR- Python headers locationPYTHON_LIBRARY- Python library pathSETUPTOOLS_*- Setuptools configurationPIP_*- pip-related build variables
Usage Context
- When Variables Are Used: During which build phase each variable takes effect
- Default Values: What happens when variables are not set
- Required vs Optional: Which variables are mandatory for successful builds
-
Provide actionable guidance:
- How to set each variable for custom builds
- Common use cases for each variable
- Potential conflicts or compatibility issues
- Recommended values for different scenarios
Output Format
The skill should provide a structured list of environment variables with:
- Variable Name: Exact environment variable name
- Purpose: Clear description of what the variable controls
- Type: Expected value type (path, boolean, string, number)
- Default Value: What happens when not set
- Source File: Where the variable was discovered
- Usage Context: When and how the variable is used
Error Handling and Edge Cases
No Build Configuration Found
- Report that no environment variables were found
- Most packages don't have build configuration so it is fine
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
torchtalk-analyzer
Analyze PyTorch internals across Python, C++, and CUDA layers using the TorchTalk MCP server. Use when asked about how PyTorch operators work internally, where functions are implemented, what would break if code is modified, or finding tests for PyTorch operators.
ai-bug-fix-triage
Triage JIRA bugs against repository code to classify AI fixability. Use when reviewing a backlog of bugs to determine which ones an AI agent can fix.
python-packaging-complexity
Analyze Python package build complexity by inspecting PyPI metadata. Evaluates compilation requirements, dependencies, distribution types, and provides recommendations for wheel building strategies.
coderabbit-review
Evaluate CodeRabbit PR comments and fix or reply
git-shallow-clone
Perform a shallow clone of a Git repository to a temporary location.
gist-upload
Upload a summary or plan from the current conversation as a GitHub Gist using the `gh` CLI.
Didn't find tool you were looking for?