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 CodeLLDBlaunch.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.cppCMakeLists.txt.vscode/tasks.json(config/build/run).vscode/launch.json(CodeLLDB)
Pybind11 Project
pycpp init --name mymodule --pybind11
Generates:
src/pywrapper.cpptest.pyCMakeLists.txt(configured against the current Python / pybind11).vscode/tasks.json(config/build/run→python 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: config → build → run.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6638764394e672aa8a5232079a1a13262b8be607e4bf21a93f9a2a1142960552
|
|
| MD5 |
6f1c74ec0075c9239e40fea293be5761
|
|
| BLAKE2b-256 |
53fb397ab751b785bcf59448fae40888eb6347de7ea93d97caa1d491e233bf18
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6121dae12202a9b4f3007ac8b6023e2be6031d3a52539287819505194738a449
|
|
| MD5 |
4e92ac10457f26346725b2e63d0a116d
|
|
| BLAKE2b-256 |
74639e50fd3f488c14dfe40615ecdaf8e49a477d195d9f17227eadf7e14a01cd
|