Declare a build dependency on pip#1365
Declare a build dependency on pip#1365AlexWaygood wants to merge 1 commit intofacebookresearch:mainfrom
pip#1365Conversation
Currently installing `fasttext` with `uv` fails, as `uv` does not, by default, include `pip` in new virtual environments:
```sh
% uv venv new-venv
Using Python 3.12.2 interpreter at: /Users/alexw/.pyenv/versions/3.12.2/bin/python3
Creating virtualenv at: new-venv
Activate with: source new-venv/bin/activate
% source new-venv/bin/activate
(new-venv) % uv pip install fasttext
error: Failed to download and build: fasttext==0.9.2
Caused by: Failed to build: fasttext==0.9.2
Caused by: Build backend failed to determine extra requires with `build_wheel()`:
--- stdout:
--- stderr:
/Users/alexw/Library/Caches/uv/.tmp2ZDKtZ/.venv/bin/python: No module named pip
Traceback (most recent call last):
File "<string>", line 38, in __init__
ModuleNotFoundError: No module named 'pybind11'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "/Users/alexw/Library/Caches/uv/.tmp2ZDKtZ/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alexw/Library/Caches/uv/.tmp2ZDKtZ/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "/Users/alexw/Library/Caches/uv/.tmp2ZDKtZ/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "/Users/alexw/Library/Caches/uv/.tmp2ZDKtZ/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 72, in <module>
File "<string>", line 41, in __init__
RuntimeError: pybind11 install failed.
---
```
|
Hi @AlexWaygood! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Currently installing
fasttextwithuvfails, asfasttext's setup.py file tries to usepipto installpybind11if it is not already installed.uvdoes not, by default, includepipin new virtual environments:This PR makes
fasttextinstallable withuvby addingpipas a build dependency.