gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Preferred method to install client libraries to python3


From: teyrana
Subject: Re: [gpsd-dev] Preferred method to install client libraries to python3
Date: Sat, 10 Feb 2018 14:15:54 -0500

Oh, dear, that's not quite what I meant.  

gpsd itself builds fine; `scons && scons check && sudo scons udev-install` runs to completion, without errors.

And for context, it so using python 2.7.14, (Ubuntu 17.10).
However, if I want to use the client libraries from python3 code, I have to manually create and install the package.

As SCons finishes, we can see it install files to:
Install file: "gps/__init__.py" as "/usr/lib/python2.7/dist-packages/gps/__init__.py"
Install file: "gps/client.py" as "/usr/lib/python2.7/dist-packages/gps/client.py"
Install file: "gps/fake.py" as "/usr/lib/python2.7/dist-packages/gps/fake.py"
Install file: "gps/gps.py" as "/usr/lib/python2.7/dist-packages/gps/gps.py"
Install file: "gps/misc.py" as "/usr/lib/python2.7/dist-packages/gps/misc.py"

But I don't see it do anything for the equivalent python3 directories, e.g. "/usr/lib/python3.6/dist-packages/gps/...."

Unfortunately, the `build.txt` is silent on how to install the python package files for python3, regardless of what the system python is.

I'd like to discuss what the best long-term solution is to install the python3 client-libraries.

Cheers,
-Dan


Also:
13:54::%> python --version
Python 2.7.14
14:07::%> gpsd -V
gpsd: 3.18~dev (revision release-3.17-34-g598b8b9b)

p.s. The ported python 2/3 code *does* seem to run fine with python 3 applications.  No complaint there.
p.p.s.  I've already created a simple proof-of-concept pip repo here: (https://github.com/teyrana/gpsd-python3).  (the setup.py file is necessary, the rest is fluff)


p.p.p.s. 
> > 2) install directly, like the python 2 variant.
> That should work fine already.

This statement implies that the SCons should *currently* install those files to both python2 and python3 dist-packages directories. *Without* further command line parameters.  

Do I understand that right?





Daniel Williams
address@hidden
858-220-8134 (Mobile)
339-368-6425 (Skype)
LinkedIn
GitHub

On Fri, Feb 9, 2018 at 12:57 PM, Gary E. Miller <address@hidden> wrote:
Yo teyrana!

On Fri, 9 Feb 2018 08:01:45 -0500
teyrana <address@hidden> wrote:

>  A few questions about the install process for python3: which I can't
> seem to find, neither in buld.txt, nor SConstruct.

Look again.

"If 'scons' fails, it is possible that your target system has moved to
Python 3 as its default 'python' interpreter, but you can work around
it by saying "python2 /usr/bin/scons" or something similar."

> Is there an existing method to install the client libraries for
> python3?

Yeah, except for the above, just do the install as build.txt says to.

> If not, have y'all discussed what you'd like to see?

More testing would be good.  We try to write Python in a dialect that
works for Python2 and Python3.

> Options I'm trying:
>
> 1) create pip package.  Install either locally, or via the pip repo.
> (Already prototyped)

That would be interesting.

> 2) install directly, like the python 2 variant.

That should work fine already.

> 3) link the package at the install directory editable package (I.e.
> "pip3 install -e . ")

Lost me?

> Also, are the .so files necessary for the pyrhon package, or just an
> optimization?

I'm not sure how the *py*so files fit in.  I just looked at the
other binaries (gpsd, gpsctl, etc.) and they do not use them.  Easy
to delete them and see what happens...

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


reply via email to

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