[tox]
envlist = py38,py39,py310,py311,py312
isolated_build = False

[testenv:py{38,39,310,311,312}]
skip_install = false
deps =
    wheel
    build
setenv =
    WITH_COMMITID = TRUE
    PYTHON_EXECUTABLE = {envpython}
    Python3_EXECUTABLE = {envpython}
commands =
    python -m build --wheel -o {toxinidir}/dist

[testenv:py{38,39,310,311,312}-pypi]
skip_install = false
setenv =
    PYPI_BUILD = TRUE
    WITH_COMMITID = FALSE
    PYTHON_EXECUTABLE = {envpython}
    Python3_EXECUTABLE = {envpython}
commands =
    python setup.py bdist_wheel --plat-name=manylinux2014_x86_64

[testenv:audit_manylinux2014]
skip_install = true
allowlist_externals =
    bash
deps =
    auditwheel
    patchelf
commands =
    bash -c 'auditwheel repair -L=/lib --exclude=/usr/local/cuda* --exclude=libcuda.so.1 --plat=manylinux2014_x86_64 dist/*'

[testenv:py38]
basepython = python3.8

[testenv:py39]
basepython = python3.9

[testenv:py310]
basepython = python3.10

[testenv:py311]
basepython = python3.11

[testenv:py312]
basepython = python3.12
