flacjacket / pywlroots

Python binding to the wlroots library using cffi
University of Illinois/NCSA Open Source License
53 stars 14 forks source link

Running the `tiny` example doesn't work if you installed pywlroots with pip #130

Open ali1234 opened 1 year ago

ali1234 commented 1 year ago

Reproduce:

  1. python3 -m venv wlroots
  2. cd wlroots
  3. source bin/activate
  4. pip3 install pywlroots
  5. git clone https://github.com/flacjacket/pywlroots
  6. cd pywlroots
  7. python3 -m tiny

Result:

(wlroots) al@al-desktop:~/wlroots/pywlroots$ python3 -m tiny
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/al/wlroots/pywlroots/tiny/__main__.py", line 13, in <module>
    from wlroots.helper import build_compositor
  File "/home/al/wlroots/pywlroots/wlroots/__init__.py", line 8, in <module>
    from ._ffi import ffi, lib
ModuleNotFoundError: No module named 'wlroots._ffi'

This happens because there is a wlroots module right next to tiny in the repository, so that one will be imported instead of the one installed by pip. But that one hasn't been built, so it does not work.

Workaround:

Move tiny somewhere else.