export UV_NO_SYNC=1

# Mirror the PyO3 variables maturin exports, so bare cargo (clippy, tests,
# rust-analyzer) and `maturin develop` share one build cache. Without them
# pyo3-build-config's fingerprint flips on every switch, and since
# arrow[pyarrow] depends on pyo3, all of arrow and datafusion recompile.
# Derived from the venv, so they track its Python version; skipped until the
# venv exists.
if [ -x .venv/bin/python ]; then
    export PYO3_PYTHON="$PWD/.venv/bin/python"
    export PYO3_ENVIRONMENT_SIGNATURE=$(.venv/bin/python -c "import sys, struct; print(f'{sys.implementation.name}-{sys.version_info.major}.{sys.version_info.minor}-{struct.calcsize(\"P\") * 8}bit')")
    export PYO3_BUILD_EXTENSION_MODULE=1
fi
