Metadata-Version: 2.3
Name: pycpp_tools
Version: 0.3.1
Summary: A utility to initialize basic CMake C++ / pybind11 projects.
Author: R.E.
Author-email: R.E. <redelephant@foxmail.com>
License: MIT
Requires-Dist: pybind11
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# 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

```bash
pip install .
```

Or install in development mode:

```bash
pip install -e .
```

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

## Usage

### CMake C++ Project

```bash
pycpp init --name myproject
```

Generates:
- `src/main.cpp`
- `CMakeLists.txt`
- `.vscode/tasks.json` (`config` / `build` / `run`)
- `.vscode/launch.json` (CodeLLDB)

### Pybind11 Project

```bash
pycpp init --name mymodule --pybind11
```

Generates:
- `src/pywrapper.cpp`
- `test.py`
- `CMakeLists.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:

```bash
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](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) (for debugging)

## License

MIT License

## Author

R.E. (redelephant@foxmail.com)
