Metadata-Version: 2.4
Name: tokenspeed-spdlog
Version: 1.15.1
Summary: TokenSpeed packaging for spdlog headers and CMake metadata.
Author: TokenSpeed maintainers
License-Expression: MIT
Project-URL: Homepage, https://github.com/lightseekorg/tokenspeed-third-party
Project-URL: Source, https://github.com/gabime/spdlog
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C++
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE.spdlog
Dynamic: license-file

# tokenspeed-spdlog

Repackaging recipe for [gabime/spdlog](https://github.com/gabime/spdlog)
under the `tokenspeed-` namespace.

The published wheel vendors upstream spdlog headers and exposes a CMake
package config that defines `spdlog::spdlog` and
`spdlog::spdlog_header_only` as header-only imported targets. This lets
TokenSpeed packages depend on `tokenspeed-spdlog` through pip instead of
fetching or installing spdlog source during every build.

## Local build

Populate the upstream headers before building:

```bash
git clone --depth 1 --branch v1.15.1 https://github.com/gabime/spdlog.git /tmp/spdlog
./prepare_headers.sh /tmp/spdlog
python -m build
```

The generated header directory is ignored by git, but it is included in the
wheel and sdist.

## CMake usage

```cmake
execute_process(
  COMMAND "${Python_EXECUTABLE}" -c "import tokenspeed_spdlog; print(tokenspeed_spdlog.cmake_prefix_path())"
  OUTPUT_VARIABLE tokenspeed_spdlog_ROOT
  OUTPUT_STRIP_TRAILING_WHITESPACE
  COMMAND_ERROR_IS_FATAL ANY
)

list(PREPEND CMAKE_PREFIX_PATH "${tokenspeed_spdlog_ROOT}")
find_package(spdlog CONFIG REQUIRED)
target_link_libraries(my_target PRIVATE spdlog::spdlog)
```

## Publishing to PyPI

`publish_to_pypi=true` is opt-in for `workflow_dispatch` runs. The publish job
uses OIDC trusted publishing with the `pypi` environment.
