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: shouldbe q931
Subject: Re: [gpsd-users] using the python gps module without scons install
Date: Thu, 7 Mar 2019 17:49:21 +0000

Hi Gary,

Apologies, I replied just to you instead of the mailing list.


On Wed, Mar 6, 2019 at 7:01 PM Gary E. Miller <address@hidden> wrote:
>
> 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.
>
Agreed if scons is called with no parameters, but with the parameters
from the clockmaker script set, the python module is not built unless
added to the line.
>
> > 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.
>

While "debugging" this, rather than working on a pi, I'm working in an
Ubuntu VM so I can revert to a snapshot instead of having to re-image
It's a clean build of 18.04, which has python 2.7.15 as opposed to the
puython 2.7.13 of rasbian stretch, but is a fairly close match
otherwise.

The very cut down bash script I am using https://pastebin.com/RVXgQ2fn
The contents of ntpsec/build/config.log https://pastebin.com/d7mT7Sya

>
> My guess is your PATH and PYTHONPATH are not right yet.
>
I'd agree, but I'm a little lost as to what the correct way would be.
I'm guessing that I:ve made a newbie mistake...

Cheers

Arne



reply via email to

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