I’m building a Python package with a custom CUDA extension using PyTorch. My setup is managed with uv and a pyproject.toml file, and the build process is defined in setup.py, similar to the FlashAttention package. However, every time I run "uv build", setuptools creates a temporary directory and recompiles the entire project from scratch, even for minor code changes. This significantly slows down development. From what I’ve researched, it seems there’s no way to specify a persistent build directory in a PEP 517 environment without using the legacy command: "python setup.py build --build-base=./dir" Is this a limitation of PEP 517? Or am I missing something here? Is there a better way to avoid full recompilation without breaking the PEP 517 workflow? Continue reading...