Re: [Discuss-gnuradio] x86_64 path proposal
On Wed, Jan 17, 2007 at 01:57:30PM +0100, Trond Danielsen wrote: > 2006/11/23, David P. Reed <[EMAIL PROTECTED]>: > > > >This seems to me to be clean and "correct". It has the result that if > >you are running a 32-bit version of python, you just leave lib64 out of > >PYTHONPATH and the 64-bit-specific code will not be found first. > >(Fedora should have a lib32/python2.4/site-packages, but it depends on > >path ordering to do that). > > > > Despite the fact that this solution works, I do not think it is > "correct". No python application distributed by Fedora is split > between lib and lib64. Packages are either installed in lib or lib64. > The only time packages appare to be split between the two folders is > when both the i386 and x86_64 version is installed. From what I know, > SuSE also install x86_64 python programs only in lib64. I therefore > think the correct solution would be to install everything either in > lib64 or in lib. > I agree that our current fix (do nothing) for X86-64 on Fedora Core is insufficient. I've reopened ticket:39 and will kludge our code to work around the brain damage in FC. Eric ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] x86_64 path proposal
2006/11/23, David P. Reed <[EMAIL PROTECTED]>: This seems to me to be clean and "correct". It has the result that if you are running a 32-bit version of python, you just leave lib64 out of PYTHONPATH and the 64-bit-specific code will not be found first. (Fedora should have a lib32/python2.4/site-packages, but it depends on path ordering to do that). Despite the fact that this solution works, I do not think it is "correct". No python application distributed by Fedora is split between lib and lib64. Packages are either installed in lib or lib64. The only time packages appare to be split between the two folders is when both the i386 and x86_64 version is installed. From what I know, SuSE also install x86_64 python programs only in lib64. I therefore think the correct solution would be to install everything either in lib64 or in lib. -- Trond Danielsen ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
Re: [Discuss-gnuradio] x86_64 path proposal
Eric - A very clean fix for the path problem on Fedora x86_64 machines is as follows: in each directory in site-packages/gnuradio modify the __init__.py file to include the following two lines as the first lines after the comments: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) and then if the pyexecdir is different from pythondir, create symbolic links from each directory created in pyexecdir to __init__.py in the corresponding directory in pythondir (you could just copy __init__.py). What this does, for example, is put the above two lines in .../lib/python2.4/site-packages/gnuradio/gr/__init__.py amd a symbolic link to that file in .../lib64/python2.4/site-packages/gnuradio/gr (where the arch-dependent compiled files are installed). Thus, when you do from gnuradio import gr the path gets changed in the __init__.py to include both directories, and thus gr's pieces all do imports that search both directories. This seems to me to be clean and "correct". It has the result that if you are running a 32-bit version of python, you just leave lib64 out of PYTHONPATH and the 64-bit-specific code will not be found first. (Fedora should have a lib32/python2.4/site-packages, but it depends on path ordering to do that). I have tested this and it works swell. ___ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio