Skip to content

Commit

Permalink
bindings: python: fix package installation with Makefile build
Browse files Browse the repository at this point in the history
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: pypa/pip#3063
Suggested-by: Maxim Devaev <mdevaev@gmail.com>
Reported-by: Maxim Devaev <mdevaev@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
  • Loading branch information
Bartosz Golaszewski committed Jan 9, 2024
1 parent 8e2e30e commit 40adfc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/python/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 40adfc1

Please sign in to comment.