gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] [PATCH] Build: add the configuration variable python_libd


From: Beat Bolli
Subject: Re: [gpsd-dev] [PATCH] Build: add the configuration variable python_libdir.
Date: Wed, 04 Dec 2013 22:00:20 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 04.12.13 21:49, Greg Troxel wrote:
> 
> Beat Bolli <address@hidden> writes:
> 
>> This lets the user choose the Python install directory.
> 
> Your patch seems ok, but
> 
>> With the default settings, gpsd is installed under /usr/local,
>> except for the Python parts, which are installed in the system
>> directories under /usr/lib/pythonx.y/site-packages.
> 
> That sounds perhaps broken.  The only sane  places are a) in the PREFIX
> of gpsd and b) where the found python has site-packages, which might be
> someplace other than /usr/lib.  In particular, it would be /usr/pkg on
> pkgsrc.   If you meant "where the python interpreter thinks of as the
> standard place" rather than /usr/lib/pythonx.y/site-packages", then I
> think we're all set.

The SConstruct file unconditionally uses the expression
"sysconfig.get_python_lib(plat_specific=1)" to find the library
directory. This is a function of the Python distutils. Nowhere is the
prefix mentioned. I have checked the other config variables in
sysconfig.get_config_vars() and none of them mentions the /usr/local/...
path.

> I haven't been noticing this issue; I hope that's because I've been
> building with prefix=/usr/pkg and python is also there so all choices
> end up with the same directory anyway.

That's probably because under pkgsrc, Python was built to be installed
there, and so sysconfig returns the correct directory.

We could look in sys.path for a directory that starts with the current
prefix, but this seems a bit brittle.

Beat
-- 
mail: echo '<address@hidden>' | tr -d '[A-S]'
pgp: 0x506A903A; 49D5 794A EA77 F907 764F  D89E 304B 93CF 506A 903A
gsm: 4.7.7.6.0.7.7.9.7.1.4.e164.arpa
icbm: 47.0452 N, 7.2715 E

"It takes love over gold, and mind over matter" -- Dire Straits

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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