Problem with installation of howto

As it turns out after building howto

make install

installs a directory “howto” in …/site-packages
containing the files:
-rw-r–r-- 1 anastas nobody 1691 Feb 11 11:53 init.py
-rw-rw-r-- 1 anastas nobody 556 Feb 11 11:53 init.pyc
-rw-rw-r-- 1 anastas nobody 556 Feb 11 11:53 init.pyo

and ANOTHER directory “howto_swig” in …/site-packages/gnuradio
containing the files:
-rwxr-xr-x 1 anastas nobody 1327 Feb 11 11:52 _howto_swig.la
-rw-r–r-- 1 anastas nobody 12267 Feb 11 11:53 howto_swig.py
-rw-rw-r-- 1 anastas nobody 22958 Feb 11 11:53 howto_swig.pyc
-rw-rw-r-- 1 anastas nobody 22958 Feb 11 11:53 howto_swig.pyo
-rwxr-xr-x 1 anastas nobody 411339 Feb 11 11:52 _howto_swig.so

if i copy the files of the latter to the former then everything works,
ie, python can import howto,
otherwise, it complains!

Achilleas

Hi Achilleas,

I’ve been doing some work on the qtgui module.
When I started this work I was using a somewhat hackish approach to
building
it ‘out of tree’, this weekend I’ve been working on cleaning this up so
that
the build is based on the process used in how-to-write-a-block from
‘next’.

In the process I’ve come across the issue you describe below,

To fix it I :-

  • added a suitable swig/init.py
  • modified swig/makefile.am to include the new init.py
  • modified the import path in python/init.py
  • modified the import path python/qa_howto.py

I’ve attached a copy of my mods to this message if you’d like to give it
a
try.

I’m not sure how ‘correct’ my solution is though.

BR,

Mike VK2XMC

Sorry for the delayed response to this, but I just tested out the
howto write a block code and had the same problem. I “fixed” the code,
but according to Eric’s logs from December when he made these changes,
I’m not sure what’s happening is what is supposed to be happening
after they did some work on the swig system.

Bottom line, this might not be the right answer, but it makes it work
and it’s easy to reverse when we find the right answer.

Also, this should have only been broken in the ‘next’ branch. Can you
confirm that this is where you were seeing the problem, or was there a
problem with the ‘master’ branch as well?

Thanks,
Tom

A quick note regarding the gr-howto-write-a-block. I reworked it a bit
with what I think is a better solution. I just wanted everyone to be
aware that previously, you would have done an “import howto” whereas
now you will want “from gnuradio import howto”.

I think this naming and keeping everything under the gnuradio space
makes more sense.

Thanks,
Tom

On Tue, Feb 22, 2011 at 03:10:08PM -0500, Tom R. wrote:

A quick note regarding the gr-howto-write-a-block. I reworked it a bit
with what I think is a better solution. I just wanted everyone to be
aware that previously, you would have done an “import howto” whereas
now you will want “from gnuradio import howto”.

I think this naming and keeping everything under the gnuradio space
makes more sense.

Hi Tom,

I think this is the right way to go, but I remember a discussion about
this a while ago, when it was changed the other way. There was a problem
with binary installs of GNU Radio (see
http://www.mail-archive.com/[email protected]/msg23132.html).
So just a quick check this was accounted for…

Cheers,
MB


Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin B.
Research Associate

Kaiserstraße 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT – University of the State of Baden-Württemberg and
National Laboratory of the Helmholtz Association

On Wed, Feb 23, 2011 at 3:48 AM, Martin B. [email protected]
wrote:

Hi Tom,

I think this is the right way to go, but I remember a discussion about
this a while ago, when it was changed the other way. There was a problem
with binary installs of GNU Radio (see
http://www.mail-archive.com/[email protected]/msg23132.html).
So just a quick check this was accounted for…

Cheers,
MB

Yes, and I’ve already replaced it. After talking with Johnathan and
Eric who were involved in the original issues, I made the necessary
changes, but forgot to send a note out about it.

It’s now back to the “import howto” method.

Tom

On Wed, Feb 23, 2011 at 9:48 AM, Martin B. [email protected]
wrote:

Hi Tom,

I think this is the right way to go, but I remember a discussion about
this a while ago, when it was changed the other way. There was a problem
with binary installs of GNU Radio (see
http://www.mail-archive.com/[email protected]/msg23132.html).
So just a quick check this was accounted for…

Will this work if the howto is installed to a different place than
where GNU Radio is installed (i.e. using a different --prefix)?
In that case there will be two python packages called gnuradio, one in
the GNU Radio installation and one in the howto installation and I
don’t know if python likes that.

Alex