diff --git a/noxfile.py b/noxfile.py index 0d228df..0b1ff63 100644 --- a/noxfile.py +++ b/noxfile.py @@ -144,6 +144,11 @@ nox.options.sessions = ( # because only then are the headers needed to build `rpy2` from source included os.environ.setdefault('UV_PYTHON_PREFERENCE', 'only-managed') +# Keep temporary files (e.g., the constraints file in `install_pinned()`) +# inside the project; the folder must exist before any session uses it +tempfile.tempdir = '.cache/tmp' +os.makedirs(tempfile.tempdir, exist_ok=True) + @nox.session(name='format', python=MAIN_PYTHON) def format_(session):