Skip to contentSkip to conversation

bindings: python: fix package installation with Makefile build

PATCH New Bartosz Golaszewski 1 participant 1 message Jan 9, 2024 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bindings: python: fix package installation with Makefile build

From: Bartosz Golaszewski <[email protected]>

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.

---
 bindings/python/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
bindings/python/Makefile.am +1 -1
index 804b214..65964c7 100644
@@ -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
 
Signature · 1 line
2.40.1