filipporomani / whatsapp-python

Open source Python wrapper for the WhatsApp Cloud API.
https://pypi.org/project/whatsapp-python/
GNU Affero General Public License v3.0
90 stars 18 forks source link

[BUG] Library is not pep 517-compliant (adding to a poetry project fails) #13

Closed ldorigo closed 1 year ago

ldorigo commented 1 year ago

Describe the bug The project does not follow pep517 (https://peps.python.org/pep-0517/) which means it does not work with modern python packaging tools such as poetry (https://python-poetry.org/)

To Reproduce

Either install poetry and try to poetry add whatsapp-python, or install with pip using pep517 as pip install --use-pep517 whatsapp-python

Expected behavior Package should install correctly

Screenshots

Desktop (please complete the following information):

Logs from pip install --use-pep517 whatsapp-python:

Collecting whatsapp-python
  Downloading whatsapp-python-3.0.0.tar.gz (6.5 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/home/ldorigo/envs/braindump/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/home/ldorigo/envs/braindump/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/ldorigo/envs/braindump/lib/python3.11/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m7a291kk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-m7a291kk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-m7a291kk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-m7a291kk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 3, in <module>
      ModuleNotFoundError: No module named 'pre_dist'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
filipporomani commented 1 year ago

Thanks a lot!