Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

Add pyproject.toml with pybind11 to fix a dependency issue. #1331

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thsunkid
Copy link

@thsunkid thsunkid commented Apr 18, 2023

Adding pyproject.toml helps fix the below issue when building fastText from pip.

Collecting fasttext (from -r requirements.txt (line 10))
  Downloading fasttext-0.9.2.tar.gz (68 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 68.8/68.8 kB 15.5 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [25 lines of output]
      /opt/hostedtoolcache/Python/3.9.12/x64/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 "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 3[53](https://github.com/Su-Sea/ml/actions/runs/4734674262/jobs/8403919877?pr=148#step:6:54), in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.9.12/x[64](https://github.com/Su-Sea/ml/actions/runs/4734674262/jobs/8403919877?pr=148#step:6:65)/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/opt/hostedtoolcache/Python/3.9.12/x64/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-jmomr3il/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-jmomr3il/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 320, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-jmomr3il/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 484, in run_setup
          super(_BuildMetaLegacyBackend,
        File "/tmp/pip-build-env-jmomr3il/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 335, in run_setup
          exec(code, locals())
        File "<string>", line [72](https://github.com/Su-Sea/ml/actions/runs/4734674262/jobs/8403919877?pr=148#step:6:73), in <module>
        File "<string>", line 41, in __init__
      RuntimeError: pybind11 install failed.
      [end of output]

@facebook-github-bot
Copy link
Contributor

Hi @thsunkid!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@thsunkid thsunkid changed the title Add pyproject.toml with pybind11 to a dependency issue. Add pyproject.toml with pybind11 to fix a dependency issue. Apr 18, 2023
@thsunkid
Copy link
Author

Hi @dmitryvinn ! Could you take a look?

@thunn
Copy link

thunn commented Sep 27, 2023

This patch resolved the same issue for me. Thanks @thsunkid

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

Successfully merging this pull request may close these issues.

3 participants