[Top][All Lists]

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

Re: [Discuss-gnuradio] Handling Hier Blocks in Build Process

From: Marcus Müller
Subject: Re: [Discuss-gnuradio] Handling Hier Blocks in Build Process
Date: Tue, 05 Aug 2014 19:25:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hi John,

compiling things while building kind of makes sense ;)
So, yes, this is doable.
In general, you could add the generated python files to the python install_list in the python/CMakeLists.txt, and have a hook in the grc/CMakeLists.txt that generates these, but that would break CMake's compiling-source tree differentiation.

I'd suggest looking at cmake/Modules/GrPython.cmake of your OOT. You could have a function similar to GR_PYTHON_INSTALL that does essentially the same, but instead of just shebanging the python files and adding them to an installation target, it would create python using "grcc -d <builddir>/python <grcfile>" and install that.

The __init__ automatisation was a topic some weeks ago, I don't know in which context, though. Yeah, there are python-magical ways to do that, but they can easily litter module namespaces and cause problem if that produces naming conflicts, which will not even be caught be QA (since that happens pre-install...).


On 05.08.2014 19:06, John Malsbury wrote:
I'd like to keep a large number of hier blocks organized in the apps
folder  (which may not be standard practice for GR). Ideally, I'd like to
maintain *only* the GRC files with version control, but allow the build
system to:

   - Compile the .grc files into python/xml files.
   - Install the .py files into the same location as everything else so
   they show up in the OOT module's namespace.
   - Do the same for .xml files for access to GRC.
   - If there were a way to get around manually adding the resulting .py
   file to __init__.py, that would be a nice-to-have feature so other
   developers can easily add hier blocks to the module's namespace.

I was just wondering if someone could tell me if this was possible, has
been done already, or might be an unreasonable thing to do for some
reason.  (before I waste an afternoon).


Discuss-gnuradio mailing list

reply via email to

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