Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing dependencies before build fails when using uv and disabling build isolation #1955

Open
burgholzer opened this issue Aug 5, 2024 · 0 comments

Comments

@burgholzer
Copy link
Contributor

Description

According to the cibuildwheel documentation, it is valid to disable build isolation for the wheel builds via

build-frontend = { name = "build[uv]", args = ["--no-isolation"] }

Naturally, this requires to install the build time dependencies manually.
However, specifying

before-build = "uv pip install scikit-build-core[pyproject]>=0.8.1 setuptools_scm>=7 pybind11>=2.13"

and then running cibuildwheel results in

Building cp38-manylinux_x86_64 wheel
CPython 3.8 manylinux x86_64

Setting up build environment...

    + /opt/python/cp38-cp38/bin/python -c 'import sys, json, os; json.dump(os.environ.copy(), sys.stdout)'
    + which python
    + which uv

                                                              ✓ 0.07s
Running before_build...

    + sh -c 'uv pip install scikit-build-core[pyproject]>=0.8.1 setuptools_scm>=7 pybind11>=2.13'
error: No virtual environment found

                                                              ✕ 3.16s
Error: Command ['sh', '-c', 'uv pip install scikit-build-core[pyproject]>=0.8.1 setuptools_scm>=7 pybind11>=2.13'] failed with code 2. 

This only seems to be happening under linux because for all the other operating systems, cibuildwheel explicitly calls uv venv ... in the "Setting up build environment..." step.

Build log

No response

CI config

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants