[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the easiest / best way to build just the Python client libra

From: Gary E. Miller
Subject: Re: What is the easiest / best way to build just the Python client library?
Date: Sun, 13 Feb 2022 16:25:16 -0800

Yo W.!

On Sun, 13 Feb 2022 18:22:22 -0500
"W. Craig Trader" <> wrote:

> The chunk of Python code in
> IS a pure Python
> client library for GPSD. That code doesn't depend on libgps.a at all
> -- it makes straight TCP calls to the GPSD daemon.

My mistake, it does not depend on on libgpa.a, it depends on
libgpsdpacket.a.  So, not Pure Python.  It does not "depend" on
libgps.a, but it imports libgpsdpacket.a as an FFI.  Check out
gps/ (the prereq to gps/packet/py).  Note this line:

    packet_path = ctypes.util.find_library('gpsdpacket')

That is where Python loads libgpsdpacket.a and then makes the functions
in there available to the gpsd python module.

> It's not well
> documented, and I'm pretty sure there's a bug with WATCH_RAW, but the
> code does work, since I've been using it for more than a year.

WATCH_RAW is almsot 20 years.  I use it every day.  It works as documented.
What is it that you think is not working about WATCHRAW?

> All I want to do is easily process the  files to produce the
> corresponding .py files, without having to do it manually and then
> maintain my own fork.

That is what scons is for.  scons does a lot of @PARAMETER@ substitutions
on the file to produce hte .py files.  The data used to make the
changes is in the scons files.  So you need to run scons.

scons is Pure Python and will run on anything that runs python.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpBlMdKuGe2q.pgp
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]