Metadata-Version: 2.5
Name: cfast-bin
Version: 8.0.0.dev352
Summary: Unofficial repackaging of the NIST CFAST fire model binaries
Project-URL: Source, https://github.com/bewygs/cfast-bin
Project-URL: CFAST, https://github.com/firemodels/cfast
Author-email: WYGAS Benoît <97663334+bewygs@users.noreply.github.com>
License-Expression: MIT AND NIST-Software AND GPL-3.0-or-later WITH GCC-exception-3.1
License-File: LICENSE
License-File: src/cfast_bin/LICENSES/CFAST-LICENSE.md
Keywords: cfast,fire,nist,zone model
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Fortran
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.9
Requires-Dist: intel-cmplr-lib-rt>=2026.1; sys_platform == 'linux'
Description-Content-Type: text/markdown

# cfast-bin

[![PyPI](https://img.shields.io/pypi/v/cfast-bin)](https://pypi.org/project/cfast-bin/)
[![Build](https://github.com/bewygs/cfast-bin/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/bewygs/cfast-bin/actions/workflows/build.yml)

The [CFAST](https://github.com/firemodels/cfast) fire model, as a Python wheel.

`cfast-bin` is an **unofficial** repackaging of the NIST CFAST binaries. Each wheel ships the `cfast` executable that NIST built for that platform.

## Usage

```sh
pip install cfast-bin
cfast model.in
```

From Python:

```python
import subprocess
import cfast_bin

subprocess.run([cfast_bin.executable(), "model.in"], check=True)
print(cfast_bin.CFAST_BUILD)  # NIST build string, e.g. 8-Beta-343-gd3b43914c
```

## Platforms

| Platform | Requirement |
| --- | --- |
| Linux x86_64 | glibc ≥ 2.34 |
| macOS arm64 | Release versions only |
| Windows x64 | — |

Requirements come from the NIST binaries and may change between CFAST versions.

## Versioning

Versions follow CFAST, so `8.0.0` contains the binaries of the CFAST 8.0.0 release and `8.0.0.post1` is a packaging-only fix of it. Nightly builds are versioned `8.0.0.dev<N>`, where `N` is the NIST Beta number.

## Licenses

- CFAST is NIST software, distributed under the [NIST notice](https://github.com/firemodels/cfast/blob/master/LICENSE.md). On Linux, the binary's RPATH is modified so that it finds the Intel runtime, and the wheel's `NOTICE` records this change.
- The Intel runtime on Linux is not bundled. It comes from the [`intel-cmplr-lib-rt`](https://pypi.org/project/intel-cmplr-lib-rt/) dependency.
- macOS wheels include the GCC runtime libraries (`libgfortran`, `libquadmath`, `libgcc_s`), under the GPLv3 with the GCC Runtime Library Exception.
- The code of this repository is under the MIT license.

## Development

```sh
uv run scripts/prepare.py --platform linux   # or macos, windows; --asset for a local bundle or URL
uv build --wheel
uv venv && uv pip install dist/*.whl pytest
.venv/bin/python -m pytest tests
```

`prepare.py` downloads the newest nightly bundle with `gh` and stages it into `src/cfast_bin/`. Extracting a macOS bundle outside macOS needs `7z`.
