gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] using the python gps module without scons install


From: Gary E. Miller
Subject: Re: [gpsd-users] using the python gps module without scons install
Date: Wed, 6 Mar 2019 10:58:33 -0800

Yo shouldbe!

On Wed, 6 Mar 2019 18:08:20 +0000
shouldbe q931 <address@hidden> wrote:

> I'm trying to muddle my way through to modify the ntpsec clockmaker
> script

Cool.

> to also build ntploggps.

Uh, ntploggps is python, nothing to build.

> ntploggps has a dependancy for the
> python gps module, which I have learnt is is built if python=yes is
> added to the scons "timeservice=yes" line.

I believe python=yes is the default, if a working python is found.
Can't hurt to force it on.


> If I "sudo scons install", the python module is "installed" and the
> waf "configure" sees the module and builds ntploggps automatically.

Cool.

> Although this technique works, it adds two more steps to the
> clockmaker script, and am trying to not add any more steps.

The intention of the clockmaker script was to NOT install.  Never
made sense to me.

> In an attempt to get around adding two more steps to the clockmaker
> script,  I first tried just adding the path /home/pi/gpsd/gps/gps.py
> to $PATH and that had no effect,

Yup.  pointless.

> then I tried adding the path to to
> $PYTHONPATH as per
> https://docs.python.org/3/tutorial/modules.html#the-module-search-path,
> which when ./waf configure, is run the ntpsec/build/config.log shows
> that it found the gps.py, but then has the "relative import in non
> package" error as below.

Yup.  I assume you added the full path to PYTHONPATH, you only want the
directory.

> Am I attempting the impossible, or is there a way of "creating" the
> python gps module without needing a "sudo scons install" ?

It should work with no changes, and with no 'scons install'.  No
way to tell without a full transcript of you procedute.

My guess is your PATH and PYTHONPATH are not right yet.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  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: pgpaB3Qov50qz.pgp
Description: OpenPGP digital signature


reply via email to

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