Pcons: new software build tool in Python, inspired by SCons and CMake
Python-based build tool blending SCons and CMake ideas in a crowded space.
Python-based software build tool
SCons co-creator reboots build systems with modern Python and Ninja generation.
C/C++/Rust developers, build system maintainers, teams managing complex compilation pipelines
CMake · SCons · Meson
What it is: Pcons is a build system where Python scripts describe what to build, and Ninja (or Make) executes it. There's no custom DSL — your build files are real Python with full IDE support, debugging, and testing. The core is completely language-agnostic: it knows nothing about compilers or C++. All tool-specific knowledge lives in pluggable toolchains and tools, so building LaTeX documents or game assets should be as natural as building C++.
How it's different from SCons: Pcons doesn't execute builds itself. It generates Ninja files, so incremental builds are fast and you get Ninja's parallelism for free. Environments use namespaced tools (env.cc.flags, env.cxx.flags, env.link.libs) instead of flat variables, eliminating the CFLAGS vs CXXFLAGS confusion. Targets have CMake-style usage requirements (target.public.include_dirs, target.public.link_libs) that propagate transitively through the dependency graph. And unlike SCons, unknown variables are errors, not silent empty strings.
How it's different from CMake: No DSL to learn — it's just Python. Variable substitution is recursive and explicit. The builder/toolchain system is fully extensible, so third-party builders are first-class citizens. And you can use it as `uvx pcons` for true zero-install (great for other open source projects).
Major features as of v0.7: - Toolchains for GCC, LLVM/Clang, MSVC, and clang-cl with auto-detection (including - Generators for Ninja, Makefile, Xcode, compile_commands.json, and Mermaid/DOT dependency diagrams - Package management via pkg-config, Conan 2.x, and a pcons-fetch tool for building dependencies from source - Compiler cache support (ccache/sccache), semantic presets (warnings, sanitizers, LTO, hardening), cross-compilation presets (Android NDK, iOS, WebAssembly) - Platform-specific helpers: macOS bundles/frameworks/.pkg/.dmg, Windows manifests/MSIX, and an msvcup module for installing MSVC without Visual Studio - An extensible module/add-on system for domain-specific tasks - Debug tracing (--debug=resolve,subst) with source-location tracking on every node - Plenty of examples included, unit tests for all features, tested on Mac, Windows and LinuxIt's still under active development — ready for experimentation, not production unless you're brave. I'd love bug reports, feedback on the API design and what you'd want from a modern Python-based software build system.
Open source, MIT licensed.GitHub: https://github.com/DarkStarSystems/pcons | Docs: https://pcons.readthedocs.io | PyPI: `uvx pcons` or `pip install pcons`
Python-based build tool blending SCons and CMake ideas in a crowded space.
Unix-native AI for shell pipes and CI/CD; real guardrails, multi-provider, no lock-in.
File sorter by extension—every OS ships this in five minutes as a script.
Claude sidebar + 5 Python scripts for $9, no subscription, CORS shadow DOM done right.
Solves a genuine frustration, but it's a one-liner problem—call alert() on subprocess exit.
Wrapper scripts around Claude API; no novel approach, and $19 paywall gates most features behind PURCHASE.md.