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

rules_uv and cc toolchain #163

Open
TimotheusBachinger opened this issue Nov 5, 2024 · 0 comments
Open

rules_uv and cc toolchain #163

TimotheusBachinger opened this issue Nov 5, 2024 · 0 comments

Comments

@TimotheusBachinger
Copy link
Contributor

TimotheusBachinger commented Nov 5, 2024

Hey all,

I want to use create_venv to built a virtual environment which includes python-ldap.
python-ldap does not ship wheels, bindings must be compiled from source during installation (see https://www.python-ldap.org/en/python-ldap-3.4.3/installing.html).

With rules_uv, building a venv would fallback to searching for clang and fail during bazel run:

bazel run //:create_venv
....
creating build/temp.linux-x86_64-cpython-312/Modules
clang -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -fPIC -fPIC -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=3.4.3 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -I/home/timotheus/.cache/uv/builds-v0/.tmpI2PFRO/include -I/home/timotheus/.cache/bazel/_bazel_timotheus/8eab503e08f341c0f5040098b6ae80b5/external/rules_python~~python~python_3_12_3_x86_64-unknown-linux-gnu/include/python3.12 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-312/Modules/LDAPObject.o

[stderr]
/home/timotheus/.cache/uv/builds-v0/.tmpI2PFRO/lib/python3.12/site-packages/setuptools/_distutils/dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
  warnings.warn(msg)
no previously-included directories found matching 'Doc/.build'
error: command 'clang' failed: No such file or directory

In our project, we already have a cc toolchain registered via rules_cc.
Is it possible to tell rules_uv to use that toolchain instead of searching for clang?

Regards
Timi

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

No branches or pull requests

1 participant