diff mbox series

[libgpiod] bindings: python: pass DESTDIR to setup.py

Message ID 20230213170504.360265-1-brgl@bgdev.pl
State New
Headers show
Series [libgpiod] bindings: python: pass DESTDIR to setup.py | expand

Commit Message

Bartosz Golaszewski Feb. 13, 2023, 5:05 p.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

As per automake docs:

The DESTDIR variable can be used to perform a staged installation. The
package should be configured as if it was going to be installed in its
final location (e.g., --prefix /usr), but when running make install, the
DESTDIR should be set to the absolute name of a directory into which the
installation will be diverted. From this directory it is easy to review
which files are being installed where, and finally copy them to their
final location by some means.

Prefix $(prefix) with $(DESTDIR) when calling setup.py.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 bindings/python/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am
index 9fb2e95..75ce53b 100644
--- a/bindings/python/Makefile.am
+++ b/bindings/python/Makefile.am
@@ -18,7 +18,7 @@  all-local:
 
 install-exec-local:
 	GPIOD_WITH_TESTS= \
-	$(PYTHON) $(srcdir)/setup.py install --prefix=$(prefix)
+	$(PYTHON) $(srcdir)/setup.py install --prefix=$(DESTDIR)$(prefix)
 
 SUBDIRS = gpiod