Forum: GNU Radio External modules include path / namespace

0817fa933c74eec9b3fcf3a04e16f418?d=identicon&s=25 Sylvain Munaut (Guest)
on 2013-06-02 00:20
(Received via mailing list)
Hi,

From looking at what gr_modtool generate, you get

include: $prefix/include/module_name/
namespace: gr::module_name::
python: $prefix/lib/site-package/module_name/

Since the module are placed in the gr:: namespace, wouldn't it make
sense to have :

include: $prefix/include/gnuradio/module_name/
namespace: gr::module_name::
python: $prefix/lib/site-package/gnuradio/module_name/

This would also make external modules that much closer to internal
ones and further reduce the difference between in-tree / out-of-tree

Cheers,

    Sylvain
Ad80d352eb445a3d7dccd5a779db0e43?d=identicon&s=25 Martin Braun (CEL) (Guest)
on 2013-06-02 15:58
(Received via mailing list)
On Sun, Jun 02, 2013 at 12:18:49AM +0200, Sylvain Munaut wrote:
>
> This would also make external modules that much closer to internal
> ones and further reduce the difference between in-tree / out-of-tree

Just pointing out that oot-modules have always been a bit different,
e.g. import MODULE vs. from gnuradio import MODULE. Also, I don't mind
having a dedicated folder for core gnuradio stuff.
I agree making the folder structures for in- and out-tree modules more
similar is good, though. So, just some thoughts here, perhaps we'll talk
about this this week.

MB

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

Dipl.-Ing. Martin Braun
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
0817fa933c74eec9b3fcf3a04e16f418?d=identicon&s=25 Sylvain Munaut (Guest)
on 2013-06-02 16:29
(Received via mailing list)
Hi Martin,

> I agree making the folder structures for in- and out-tree modules more
> similar is good, though. So, just some thoughts here, perhaps we'll talk
> about this this week.

I don't mind having a namespace for core stuff either but then maybe
it should have like gnuradio.ext.module_name or something and make it
coherent between include/c++ namespace/python.

Else you end up having to include some "gnuradio marker" in the module
name to make sure it doesn't clash with general python stuff or
general include stuff.

I actually only realized that oot were still not under some "gnuradio"
separate path when converting a module this weekend and since I guess
a lot of OOT module are going to get ported soon, now would be the
right time.

Cheers,

    Sylvain
D3e3c5e41e9aed486856802be823e181?d=identicon&s=25 Johnathan Corgan (Guest)
on 2013-06-02 16:31
(Received via mailing list)
On Jun 2, 2013, at 9:58, "Martin Braun (CEL)" <martin.braun@kit.edu>
wrote:

>> python: $prefix/lib/site-package/gnuradio/module_name/
>>
>> This would also make external modules that much closer to internal
>> ones and further reduce the difference between in-tree / out-of-tree
>
> Just pointing out that oot-modules have always been a bit different,
> e.g. import MODULE vs. from gnuradio import MODULE. Also, I don't mind
> having a dedicated folder for core gnuradio stuff.
> I agree making the folder structures for in- and out-tree modules more
> similar is good, though. So, just some thoughts here, perhaps we'll talk
> about this this week.

The main reason OOT modules are 'import foo' and not 'from gnuradio
import foo' is that OOT modules typically install into
$PREFIX=/usr/local, and if GNU Radio is installed into $PREFIX=/usr,
the import would not work.

Johnathan
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.