From: Bartosz Golaszewski Date: Tue, 9 Jan 2024 19:09:37 +0000 (+0100) Subject: bindings: python: fix package installation with Makefile build X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=40adfc1eb681d2b5ded27b53f1c6267daed4d7a3;p=qemu-gpiodev%2Flibgpiod.git bindings: python: fix package installation with Makefile build The modules are installed in the .egg directory, and therefore cannot be imported after that. Additionally PIP tries to remove the global gpiod module if it's not invoked with the --ignore-installed option. Specify correct --root and fix the --prefix switch. Link: https://github.com/pypa/pip/issues/3063 Suggested-by: Maxim Devaev Reported-by: Maxim Devaev Signed-off-by: Bartosz Golaszewski --- diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am index 804b214..65964c7 100644 --- a/bindings/python/Makefile.am +++ b/bindings/python/Makefile.am @@ -36,7 +36,7 @@ all-local: python-tests install-exec-local: $(PYTHON) -m pip install dist/*.whl \ - --prefix=$(DESTDIR)$(prefix) + --ignore-installed --prefix=$(prefix) --root=$(if $(DESTDIR),$(DESTDIR),/) SUBDIRS = gpiod