spin
Developer tool for scientific Python libraries
What it is and what it does
spin is a developer tool designed to centralize and simplify the command-line incantations needed to work on scientific Python libraries. Instead of memorizing or maintaining scattered Makefiles, developers configure spin once in pyproject.toml to expose a curated set of build, test, documentation, and shell commands—both built-in (Meson, pip, pytest, Sphinx) and custom. The tool emerged from the mass migration of libraries to Meson after distutils deprecation, when many teams needed a unified way to abstract away changing build workflows.
spun runs as a CLI that presents a menu of available commands, supports shell auto-completion, and allows per-project customization through configuration sections and argument overrides. It integrates with click for command definition, tomli for TOML parsing, and colorama for terminal output, making it lightweight and portable across Python 3.10+.
Use it for:
- Provide a consistent developer interface for a library migrating to Meson without requiring developers to learn new build commands.
- Organize and document multiple build, test, and documentation tasks in a single entry point with grouped command sections.
- Extend built-in Meson or pip commands with project-specific pre- or post-processing logic via custom command decorators.
- Enable shell auto-completion for development workflows to reduce typos and cognitive load in repetitive build cycles.
- Abstract away vendored or custom Meson installations by configuring a project-specific Meson CLI path.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
spin is a command-line tool that abstracts common development tasks for scientific Python libraries, replacing ad-hoc Makefiles with a configurable, Python-based interface for build, test, and documentation workflows.
Yes. spin is worth installing if you maintain or contribute to a scientific Python library using Meson or modern build tools. It is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real problem—centralizing scattered build commands into a single, discoverable interface. The BSD license is permissive. If your project uses traditional Makefiles or simpler build systems, the benefit is smaller but still real if you want to unify developer experience.
Install
spin on PyPI
pip
pip install spinuv
uv add spinpoetry
poetry add spinInstalling spin
Before you install
Low friction install with four lightweight runtime dependencies (click, tomli, colorama, importlib_metadata). Package is actively maintained with recent commits and has been stable since its 2022 release.
License in practice
BSD 3-Clause License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install spin
# Create or edit pyproject.toml with [tool.spin] section:
# [tool.spin]
# package = "your_package_name"
# commands = ["spin.cmds.meson.build", "spin.cmds.meson.test"]
# Run spin to see available commands:
spin
Requires Python 3.10 or later. Projects must have a pyproject.toml or .spin.toml configuration file defining the package name and desired commands.
Verify before relying
- Whether spin works with non-Meson build systems beyond the built-in PEP 517 and pip support
- Performance overhead compared to direct Meson or Make invocation for large projects
Package facts
| License | BSD 3-Clause License Copyright (c) 2021--2024, Scientific Python project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — click, tomli, colorama, importlib_metadata |
| Maintenance | actively maintained — 138 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 363,549/month — #7,220 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: spin-0.18-py3-none-any.whl
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
mesonMeson is a build system that reads declarative…
permissive · top 5,000 on PyPI
clickClick is a Python toolkit for building…
permissive · top 100 on PyPI
cmeelcmeel is a PEP 517 build backend that packages…
permissive · top 5,000 on PyPI
meson-pythonmeson-python is a PEP 517 build backend that…
permissive · top 5,000 on PyPI
nixl-cu12NIXL provides Python bindings to accelerate…
permissive · top 15,000 on PyPI
wheelA command-line tool for inspecting, converting,…
permissive · top 100 on PyPI
installerA low-level library for unpacking and…
permissive · top 1,000 on PyPI
nixl-cu13NIXL provides Python bindings to accelerate…
permissive · top 15,000 on PyPI
md-click-2Generates markdown documentation files…
permissive · top 15,000 on PyPI
stoneStone is an interface description language and…
permissive · top 5,000 on PyPI