skillfed

cppyy-cling

Re-packaged Cling, as backend for cppyy

cppyy-cling v6.32.8 112.7K downloads/30d#12,363 on PyPI
Copyleft license LLVM: UoI-NCSA; ROOT: LGPL 2.1 DORMANT released

What it is and what it does

cppyy-cling is a repackaged version of Cling, an LLVM-based C++ interpreter, designed to serve as the runtime backend for cppyy. It allows Python programs to define and call C++ code directly from within Python, bridging the two languages at runtime. The package includes patches for improved performance and better Python integration.

The package is distributed primarily as prebuilt wheels for common platforms to avoid lengthy LLVM compilation during installation. If a prebuilt wheel is not available for your platform, installation will require building LLVM from source, which the documentation warns is time-consuming. The project is currently dormant, with the last release 605 days ago.

Use it for:

  • Embed C++ code snippets directly in Python scripts for performance-critical sections without writing separate C++ modules
  • Prototype C++ libraries interactively from Python without recompiling between iterations
  • Call existing C++ functions and classes from Python at runtime without manual wrapper generation
  • Integrate numerical or systems-level C++ code into Python data science or scientific workflows

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Cling, an LLVM-based interactive C++ interpreter, packaged as a library backend for cppyy to enable Python code to call C++ directly.

Yes, if you need direct Python-to-C++ interop and are on a supported platform with a prebuilt wheel. Install friction is moderate and manageable via wheels. However, the dormant maintenance status means security updates and compatibility fixes may lag; verify that the package works with your target Python and C++ versions before committing to production use.

Install

cppyy-cling on PyPI

pip

pip install cppyy-cling

uv

uv add cppyy-cling

poetry

poetry add cppyy-cling

Installing cppyy-cling

Before you install

Medium install friction: prebuilt wheels exist for major platforms (macOS x86_64 and arm64, Linux x86_64, Windows 32/64-bit), but source builds require compiling LLVM, which is time-consuming. Last release was 605 days ago; maintenance status is dormant.

License in practice

Dual-licensed under LLVM's UoI-NCSA and ROOT's LGPL 2.1 (copyleft). Use is permitted but derivative works and distributions may require source disclosure under LGPL terms.

Quickstart

pip install cppyy-cling

import cppyy
cppyy.cppdef('int add(int a, int b) { return a + b; }')
result = cppyy.gbl.add(2, 3)

Source builds require LLVM compilation (time-intensive); prebuilt wheels available for macOS (x86_64, arm64), Linux x86_64, and Windows (32/64-bit). No explicit Python version requirement stated in metadata.

Verify before relying

  • Whether Python 2.7 support (listed in classifiers) is actively maintained or tested in recent releases
  • Current state of the upstream Cling project and whether patches for Python integration remain compatible
  • Practical build time and resource requirements when compiling LLVM from source

Package facts

License LLVM: UoI-NCSA; ROOT: LGPL 2.1 (copyleft)
Python support not specified
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance dormant — 605 days since the last release
First released
Downloads 112,653/month — #12,363 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cppyy_cling-6.32.8-py2.py3-none-macosx_10_15_x86_64.whl; cppyy_cling-6.32.8-py2.py3-none-macosx_14_0_arm64.whl; cppyy_cling-6.32.8-py2.py3-none-manylinux2014_x86_64.whl; cppyy_cling-6.32.8-py2.py3-none-win32.whl; cppyy_cling-6.32.8-py2.py3-none-win_amd64.whl

Keywords: interpreter, development

Development Status :: 6 - MatureIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)License :: OSI Approved :: University of Illinois/NCSA Open Source LicenseNatural Language :: EnglishOperating System :: MacOS :: MacOS XOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: CProgramming Language :: C++Programming Language :: Python :: 2Programming Language :: Python :: 2.7Topic :: Software DevelopmentTopic :: Software Development :: Interpreters

Tags

C++ interpreter Pythoncall C++ from Pythoncppyy backendLLVM C++ interopPython C++ bindingsinteractive C++ PythonCling interpreter
c++-interopinterpreterlanguage-bridge

More Software Development packages