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: Gary E. Miller
Subject: Re: [gpsd-dev] Preferred method to install client libraries to python3
Date: Sat, 10 Feb 2018 11:44:43 -0800

Yo teyrana!

On Sat, 10 Feb 2018 14:15:54 -0500
teyrana <address@hidden> wrote:

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

Good.  Does it actually work?

> And for context, it so using python 2.7.14, (Ubuntu 17.10).

OK.

> However, if I want to use the client libraries from python3 code, I
> have to manually create and install the package.

If you have python 2.7.14, why do you want to use Python 3 libraries?

> 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"  

Yes.

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

Yeah, from the SConstruct file:

# Unfinished items:
[...]
# * Python 3 compatibility in this recipe

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

Yup.

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

Well, long term, someone has to fix the SContruct file to handle Python3
installs.

I think you can use these two scons options to target python3:

   ("target_python",    "python",      "target Python version as command"),
   ("python_libdir",    "",            "Python module directory prefix"),
    
But I've never played around in there.  I've alays stuck with python2.
Way too many issues with Python 3, but they seem to have shaken most of
them out now.

Hopefully someone else has played in there and can help.

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: pgp9mPn67zmlb.pgp
Description: OpenPGP digital signature


reply via email to

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