Skip to main content

A utility to initialize basic CMake C++ / pybind11 projects.

Project description

pycpp-tools

A command-line utility to initialize a basic CMake C++ or pybind11 project.

Features

  • Initialize a CMake C++ project (CMake 3.30, C++23, Ninja)
  • Initialize a pybind11 project with --pybind11
  • Generate VS Code tasks.json (config / build / run) and CodeLLDB launch.json

Installation

pip install .

Or install in development mode:

pip install -e .

After installation, the pycpp command will be available in your terminal.

Usage

CMake C++ Project

pycpp init --name myproject

Generates:

  • src/main.cpp
  • CMakeLists.txt
  • .vscode/tasks.json (config / build / run)
  • .vscode/launch.json (CodeLLDB)

Pybind11 Project

pycpp init --name mymodule --pybind11

Generates:

  • src/pywrapper.cpp
  • test.py
  • CMakeLists.txt (configured against the current Python / pybind11)
  • .vscode/tasks.json (config / build / runpython test.py)
  • .vscode/launch.json (CodeLLDB attached to Python + test.py)

Options:

  • --name <name>: project / module name (default: demo)
  • --pybind11: initialize as a pybind11 module

Then build as usual:

cmake -B build -G Ninja
cmake --build build

Or use the VS Code tasks: configbuildrun.

Requirements

  • Python 3.13 or higher
  • CMake 3.30 or higher
  • C++ compiler supporting C++23
  • Ninja
  • CodeLLDB (for debugging)

License

MIT License

Author

R.E. (redelephant@foxmail.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycpp_tools-0.3.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pycpp_tools-0.3.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file pycpp_tools-0.3.1.tar.gz.

File metadata

  • Download URL: pycpp_tools-0.3.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pycpp_tools-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6638764394e672aa8a5232079a1a13262b8be607e4bf21a93f9a2a1142960552
MD5 6f1c74ec0075c9239e40fea293be5761
BLAKE2b-256 53fb397ab751b785bcf59448fae40888eb6347de7ea93d97caa1d491e233bf18

See more details on using hashes here.

File details

Details for the file pycpp_tools-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pycpp_tools-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pycpp_tools-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6121dae12202a9b4f3007ac8b6023e2be6031d3a52539287819505194738a449
MD5 4e92ac10457f26346725b2e63d0a116d
BLAKE2b-256 74639e50fd3f488c14dfe40615ecdaf8e49a477d195d9f17227eadf7e14a01cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page