Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 23 additions & 94 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,20 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-14, macos-15]
os: [ubuntu-22.04, windows-2022, macos-15]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: "recursive"

# Used to host cibuildwheel
- uses: actions/setup-python@v5
with:
python-version: "3.9"

- name: Install dependencies (Linux/MacOS)
if: runner.os != 'Windows'
run: |
python -m pip install --upgrade pip
python -m pip install uv
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
shell: bash

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
env:
RUST_LOG: trace
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -e .[all] --verbose
shell: cmd

- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
env:
# disable repair
CIBW_REPAIR_WHEEL_COMMAND: ""
# Skip cibuildwheel's default i686 sidecar and keep Linux release
# wheels on a portable x86_64 CPU baseline.
CIBW_ARCHS_LINUX: "auto64"
CIBW_ENVIRONMENT_LINUX: CMAKE_ARGS="-DGGML_NATIVE=off"
# Keep macOS release wheels on a portable CPU baseline instead of
# inheriting the hosted runner's native flags.
CIBW_ENVIRONMENT_MACOS: CMAKE_ARGS="-DGGML_NATIVE=off"
uses: pypa/cibuildwheel@v3.4.0
with:
package-dir: .
output-dir: wheelhouse

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
Expand All @@ -66,25 +33,17 @@ jobs:
name: Build arm64 wheels
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: "recursive"

- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_SKIP: "*musllinux* pp*"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_ARCHS: "aarch64"
# Keep native arm64 builds on a portable CPU baseline instead of
# tuning wheels to the hosted runner.
CIBW_ENVIRONMENT: CMAKE_ARGS="-DGGML_NATIVE=off"
CIBW_BUILD: "cp38-* cp39-* cp310-* cp311-* cp312-*"
uses: pypa/cibuildwheel@v3.4.0
with:
output-dir: wheelhouse

- name: Upload wheels as artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: wheels_arm64
path: ./wheelhouse/*.whl
Expand All @@ -96,90 +55,60 @@ jobs:
fail-fast: false
matrix:
shard:
- name: cp310
build: "cp310-*"
artifact: wheels_riscv64_cp310
- name: cp311
build: "cp311-*"
artifact: wheels_riscv64_cp311
- name: cp312
build: "cp312-*"
artifact: wheels_riscv64_cp312
- name: cp313
build: "cp313-*"
artifact: wheels_riscv64_cp313
- name: cp314
build: "cp314-*"
artifact: wheels_riscv64_cp314
- name: manylinux
build: "*manylinux*"
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: "recursive"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
with:
platforms: linux/riscv64

- name: Build wheels
uses: pypa/cibuildwheel@v3.1.2
uses: pypa/cibuildwheel@v3.4.0
env:
CIBW_SKIP: "*musllinux* pp*"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_ARCHS: "riscv64"
# Build riscv64 wheels against a conservative baseline instead of
# enabling RVV-related extensions from the build container.
CIBW_ENVIRONMENT: CMAKE_ARGS="-DGGML_NATIVE=off -DGGML_RVV=off -DGGML_RV_ZFH=off -DGGML_RV_ZVFH=off -DGGML_RV_ZICBOP=off -DGGML_RV_ZIHINTPAUSE=off"
# Split the emulated riscv64 build into one Python version per job
# to minimize wall-clock time without changing the release artifacts.
CIBW_BUILD: ${{ matrix.shard.build }}
with:
output-dir: wheelhouse

- name: Upload wheels as artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.shard.artifact }}
name: wheels_riscv64_${{ matrix.shard.name }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
submodules: "recursive"

- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v7
with:
python-version: "3.9"

- name: Install dependencies (Linux/MacOS)
if: runner.os != 'Windows'
run: |
python -m pip install --upgrade pip
python -m pip install uv
RUST_LOG=trace python -m uv pip install -e .[all] --verbose
python -m uv pip install build
shell: bash

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
- name: Install dependencies
env:
RUST_LOG: trace
RUST_LOG: trace
run: |
python -m pip install --upgrade pip
python -m pip install uv
python -m uv pip install -e .[all] --verbose
python -m uv pip install build
shell: cmd
uv venv
uv pip install -e .[all] --verbose

- name: Build source distribution
run: |
python -m build --sdist
uv build --sdist

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: sdist
path: ./dist/*.tar.gz
Expand All @@ -191,7 +120,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
merge-multiple: true
path: dist
Expand Down
25 changes: 24 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["scikit-build-core[pyproject]>=0.9.2"]
requires = ["scikit-build-core>=0.12.2"]
build-backend = "scikit_build_core.build"

[project]
Expand Down Expand Up @@ -63,6 +63,7 @@ all = [

[tool.scikit-build]
wheel.packages = ["llama_cpp"]
wheel.py-api = "py3"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option generates tags like py3-none-manylinux_2_34_x86_64.whl.
https://scikit-build-core.readthedocs.io/en/latest/reference/configs.html#confval-wheel.py-api

cmake.verbose = true
cmake.minimum-version = "3.21"
minimum-version = "0.5.1"
Expand Down Expand Up @@ -91,3 +92,25 @@ ignore = ["E712"]

[tool.pytest.ini_options]
testpaths = "tests"

[tool.cibuildwheel]
archs = ["auto64"]
# llama.cpp requires glibc 2.31+. manylinux_2_34 is the oldest manylinux image with glibc 2.31.
Copy link
Author

@Bing-su Bing-su Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  INFO:auditwheel.wheel_abi:setting libc to glibc
  
  llama_cpp_python-0.3.19-py3-none-linux_x86_64.whl is consistent with
  the following platform tag: "linux_x86_64".
  
  The wheel references external versioned symbols in these
  system-provided shared libraries: libgcc_s.so.1 with versions
  {'GCC_3.0', 'GCC_3.4'}, libm.so.6 with versions {'GLIBC_2.27',
  'GLIBC_2.2.5'}, libstdc++.so.6 with versions {'GLIBCXX_3.4.17',
  'CXXABI_1.3.8', 'CXXABI_1.3.5', 'GLIBCXX_3.4.19', 'CXXABI_1.3',
  'GLIBCXX_3.4.18', 'GLIBCXX_3.4.25', 'CXXABI_1.3.11', 'GLIBCXX_3.4.22',
  'GLIBCXX_3.4.9', 'GLIBCXX_3.4.14', 'GLIBCXX_3.4.21', 'GLIBCXX_3.4.15',
  'CXXABI_1.3.2', 'CXXABI_1.3.9', 'GLIBCXX_3.4', 'GLIBCXX_3.4.20',
  'GLIBCXX_3.4.11', 'CXXABI_1.3.3'}, libc.so.6 with versions
  {'GLIBC_2.17', 'GLIBC_2.16', 'GLIBC_2.14', 'GLIBC_2.3', 'GLIBC_2.6',
  'GLIBC_2.4', 'GLIBC_2.7', 'GLIBC_2.2.5'}, libpthread.so.0 with
  versions {'GLIBC_2.3.4', 'GLIBC_2.2.5'}, libgomp.so.1 with versions
  {'GOMP_1.0', 'GOMP_4.0', 'OMP_1.0'}, libdl.so.2 with versions
  {'GLIBC_2.2.5'}
  
  This constrains the platform tag to "manylinux_2_31_x86_64". In order
  to achieve a more compatible tag, you would need to recompile a new
  wheel from source on a system with earlier versions of these
  libraries, such as a recent manylinux image.
  INFO:auditwheel.main_repair:Repairing llama_cpp_python-0.3.19-py3-none-linux_x86_64.whl
  usage: auditwheel [-h] [-V] [-v] command ...
  auditwheel: error: cannot repair "/tmp/cibuildwheel/built_wheel/llama_cpp_python-0.3.19-py3-none-linux_x86_64.whl" to "manylinux_2_28_x86_64" ABI because of the presence of too-recent versioned symbols. You'll need to compile the wheel on an older toolchain.

# see all manylinux images here: https://github.com/pypa/manylinux
manylinux-x86_64-image = "manylinux_2_34"
manylinux-aarch64-image = "manylinux_2_34"
skip = "*musllinux*" # Segmentation fault occurs on musllinux python 3.10+
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  Successfully installed MarkupSafe-3.0.3 annotated-doc-0.0.4 annotated-types-0.7.0 anyio-4.13.0 certifi-2026.2.25 click-8.3.1 diskcache-5.6.3 exceptiongroup-1.3.1 fastapi-0.135.2 filelock-3.25.2 fsspec-2026.2.0 h11-0.16.0 hf-xet-1.4.2 httpcore-1.0.9 httpx-0.28.1 huggingface-hub-1.8.0 idna-3.11 iniconfig-2.3.0 jinja2-3.1.6 llama-cpp-python-0.3.19 markdown-it-py-4.0.0 mdurl-0.1.2 numpy-2.2.6 packaging-26.0 pluggy-1.6.0 pydantic-2.12.5 pydantic-core-2.41.5 pydantic-settings-2.13.1 pygments-2.19.2 pytest-9.0.2 python-dotenv-1.2.2 pyyaml-6.0.3 rich-14.3.3 scipy-1.15.3 shellingham-1.5.4 sse-starlette-3.3.3 starlette-1.0.0 starlette-context-0.3.6 tomli-2.4.1 tqdm-4.67.3 typer-0.24.1 typing-extensions-4.15.0 typing-inspection-0.4.2
      + mkdir -p /tmp/tmp.ACiMCD/test_cwd
      + mkdir -p /tmp/tmp.ACiMCD/test_cwd/tests
      + mkdir -p /tmp/tmp.ACiMCD/test_cwd/vendor
      + sh -c 'pytest -v ./tests'
  ============================= test session starts ==============================
  platform linux -- Python 3.10.19, pytest-9.0.2, pluggy-1.6.0 -- /tmp/tmp.ACiMCD/venv/bin/python
  cachedir: .pytest_cache
  rootdir: /tmp/tmp.ACiMCD/test_cwd
  plugins: anyio-4.13.0
  collecting ... collected 11 items
  
  tests/test_llama.py::test_llama_cpp_version PASSED                       [  9%]
  tests/test_llama.py::test_llama_cpp_tokenization PASSED                  [ 18%]
  tests/test_llama.py::test_real_model PASSED                              [ 27%]
  Fatal Python error: Segmentation fault
  
  Thread 0x00007fe9f04f6b30 (most recent call first):
    File "/opt/python/cp310-cp310/lib/python3.10/threading.py", line 324 in wait
    File "/opt/python/cp310-cp310/lib/python3.10/threading.py", line 607 in wait
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/tqdm/_monitor.py", line 60 in run
    File "/opt/python/cp310-cp310/lib/python3.10/threading.py", line 1016 in _bootstrap_inner
    File "/opt/python/cp310-cp310/lib/python3.10/threading.py", line 973 in _bootstrap
  
  Current thread 0x00007fea0c0bab28 (most recent call first):
    Garbage-collecting
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/llama_cpp/_internals.py", line 273 in free_ctx
    File "/opt/python/cp310-cp310/lib/python3.10/contextlib.py", line 449 in _exit_wrapper
    File "/opt/python/cp310-cp310/lib/python3.10/contextlib.py", line 561 in __exit__
    File "/opt/python/cp310-cp310/lib/python3.10/contextlib.py", line 584 in close
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/llama_cpp/_internals.py", line 279 in close
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/llama_cpp/_internals.py", line 282 in __del__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 721 in parse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 731 in parse_tuple
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1021 in subparse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 214 in parse_statements
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 260 in parse_if
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 177 in parse_statement
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1030 in subparse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 214 in parse_statements
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 260 in parse_if
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 177 in parse_statement
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1030 in subparse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 214 in parse_statements
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 248 in parse_for
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 177 in parse_statement
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1030 in subparse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 214 in parse_statements
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 260 in parse_if
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 177 in parse_statement
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1030 in subparse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 214 in parse_statements
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 447 in parse_macro
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 177 in parse_statement
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1030 in subparse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/parser.py", line 1047 in parse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/environment.py", line 622 in _parse
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/environment.py", line 763 in compile
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/jinja2/environment.py", line 1111 in from_string
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/llama_cpp/llama_chat_format.py", line 216 in __init__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/llama_cpp/llama.py", line 516 in __init__
    File "/tmp/tmp.ACiMCD/test_cwd/tests/test_llama.py", line 135 in test_real_llama
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/python.py", line 166 in pytest_pyfunc_call
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/python.py", line 1720 in runtest
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/runner.py", line 179 in pytest_runtest_call
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/runner.py", line 245 in <lambda>
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/runner.py", line 353 in from_call
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/runner.py", line 244 in call_and_report
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/runner.py", line 137 in runtestprotocol
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/runner.py", line 118 in pytest_runtest_protocol
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/main.py", line 396 in pytest_runtestloop
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/main.py", line 372 in _main
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/main.py", line 318 in wrap_session
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/main.py", line 365 in pytest_cmdline_main
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_callers.py", line 121 in _multicall
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_manager.py", line 120 in _hookexec
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/pluggy/_hooks.py", line 512 in __call__
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 199 in main
    File "/tmp/tmp.ACiMCD/venv/lib/python3.10/site-packages/_pytest/config/__init__.py", line 223 in console_main
    File "/tmp/tmp.ACiMCD/venv/bin/pytest", line 6 in <module>
  
  Extension modules: numpy._core._multiarray_umath, numpy.linalg._umath_linalg, scipy._lib._ccallback_c, scipy.special._ufuncs_cxx, scipy.special._ufuncs, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, scipy.special._specfun, scipy.special._comb, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg._matfuncs_expm, scipy.linalg._linalg_pythran, scipy.linalg.cython_blas, scipy.linalg._decomp_update, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack, scipy.sparse.linalg._propack._zpropack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.special._ellip_harm_2, yaml._yaml, markupsafe._speedups (total: 46)
  /bin/bash: line 258:  1252 Segmentation fault      (core dumped) env CIBUILDWHEEL=1 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig HOSTNAME=168e6e417a38 LANGUAGE=en_US.UTF-8 AUDITWHEEL_POLICY=musllinux_1_2 AUDITWHEEL_ARCH=x86_64 *** HOME=/root LANG=en_US.UTF-8 SHLVL=1 LD_LIBRARY_PATH='' SSL_CERT_FILE=/opt/_internal/certs.pem AUDITWHEEL_PLAT=musllinux_1_2_x86_64 LC_ALL=en_US.UTF-8 PATH=/tmp/tmp.ACiMCD/venv/bin:/opt/python/cp310-cp310/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin DEVTOOLSET_ROOTPATH='' OLDPWD=/ _=/usr/bin/env PIP_DISABLE_PIP_VERSION_CHECK=1 PIP_ROOT_USER_ACTION=ignore CMAKE_ARGS='-DGGML_NATIVE=off -DBUILD_SHARED_LIBS=OFF' VIRTUAL_ENV=/tmp/tmp.ACiMCD/venv sh -c 'pytest -v ./tests'
  tests/test_llama.py::test_real_llama ::endgroup::Testing wheel...

test-sources = ["tests", "vendor"]
test-command = "pytest -v ./tests"
test-extras = ["test"]
test-skip = "*_riscv64" # riscv64 cannot install test packages (e.g. numpy, scipy, pydantic-core, hf-xet, etc.)

[tool.cibuildwheel.linux]
before-build = "command -v dnf && dnf install -y openssl-devel || (command -v apk && apk add --no-cache openssl-dev) || true"
repair-wheel-command = "auditwheel repair --exclude 'libcu*' -w {dest_dir} {wheel}" # don't bundle CUDA libraries

[tool.cibuildwheel.linux.environment]
CMAKE_ARGS = "-DGGML_NATIVE=OFF"

[tool.cibuildwheel.macos.environment]
CMAKE_ARGS = "-DGGML_NATIVE=OFF"