discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] x86_64 issues I'd like input about.


From: David P. Reed
Subject: Re: [Discuss-gnuradio] x86_64 issues I'd like input about.
Date: Tue, 21 Nov 2006 16:02:08 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.8) Gecko/20061107 Fedora/1.5.0.8-1.fc6 Thunderbird/1.5.0.8 Mnenhy/0.7.4.0

The .pth file really does work.   The pkgutils.extend_path solution should work.   Apparently zope and other python projects of large size have had to face the fact that a single module (gnuradio) might appear with pieces in multiple directories (such as /usr/local/...lib/site-packages/gnuradio and /home/david/personal-packages/gnuradio) and thus have solved the problem of modules that are split between parallel directory trees.   the pkgutils.extend_path is one of those solutions, and there is a more complex one called " namespace packages" that solves more problems.
Message: 4
Date: Tue, 21 Nov 2006 09:57:52 +0100
From: "Trond Danielsen" <address@hidden>
Subject: Re: [Discuss-gnuradio] x86_64 issues I'd like input about.
To: address@hidden
Message-ID:
	<address@hidden>
Content-Type: text/plain; charset="utf-8"

2006/11/21, David P. Reed <address@hidden>:
  
Having updated to FC6 on my x86_64 laptop, I decided to play with the
install process there.   A couple of issues have arisen that I would be
interested in from folks who understand more about gnuradio than I.

[...]

2. The problem with Fedora's x86_64 python library layout is well known,
but I found two approaches to work around it as I've been exploring the
depths of python search paths, etc.   One (which works like a charm) is
to put a gnuradio.pth file in lib64/site-packages, that contains:

    gnuradio
    gnuradio/gr
    gnuradio/vocoder
    gnuradio/pager
    ../../../lib/python2.4/site-packages/gnuradio
    ../../../lib/python2.4/site-packages/gnuradio/gr
    ../../../lib/python2.4/site-packages/gnuradio/vocoder
    ../../../lib/python2.4/site-packages/gnuradio/pager

This forces all of the paths to be searched for imports.
It's ugly, though it works.
I think a better solution (which I will try shortly) is to put in in
each lib64 subdirectory (listed above) an __init__.py file that uses
pkgutils.extend_path()
to force modules to search both lib64 and lib directories in parallel
for names.  I don't fully understand pkgutils.extend_path, but it seems
to be designed for just this purpose.


    

Does this work? I tried adding the python header file, but it did not
work. Anyway I think the best solution is to install both the
extention modules and the scripts in the same folder (lib64), since
the way fedora installs python libs on fc6 is wrong. I have created a
patch that takes care of this, it should also work on i386.


  

reply via email to

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