[Buildroot] [V2] package/gpsd: install gps Python library

Olivier Dautricourt olivier.dautricourt at orolia.com
Mon Aug 24 10:17:02 UTC 2020


The scons script will install the gps library in the target python3
directory, as well as useful tools like ubxtool.
No build time python dependency is required to build the library:
the *.py files are copied directly in the site-packages directory.

Signed-off-by: Olivier Dautricourt <olivier.dautricourt at orolia.com>
---
 package/gpsd/gpsd.mk | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk
index 62c4c611c3..26a8229d0d 100644
--- a/package/gpsd/gpsd.mk
+++ b/package/gpsd/gpsd.mk
@@ -23,7 +23,6 @@ GPSD_SCONS_OPTS = \
 	prefix=/usr \
 	sysroot=$(STAGING_DIR) \
 	strip=no \
-	python=no \
 	qt=no \
 	systemd=$(if $(BR2_INIT_SYSTEMD),yes,no)
 
@@ -72,6 +71,14 @@ GPSD_SCONS_OPTS += dbus_export=yes
 GPSD_DEPENDENCIES += dbus-glib
 endif
 
+# If python3 is enabled, install the gps python library
+ifeq ($(BR2_PACKAGE_PYTHON3),y)
+GPSD_SCONS_OPTS += python=yes
+GPSD_SCONS_OPTS += python_libdir=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/
+else
+GPSD_SCONS_OPTS += python=no
+endif
+
 # Protocol support
 ifneq ($(BR2_PACKAGE_GPSD_ASHTECH),y)
 GPSD_SCONS_OPTS += ashtech=no
-- 
2.25.1



More information about the buildroot mailing list