9 Commits

Author SHA1 Message Date
Volker Schroer
08a06852d3 grcc: save generated hier code to the correct location
Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
2022-03-27 10:20:01 -04:00
Josh Morman
b7828c950c grc: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
2021-11-24 14:41:53 -05:00
JaredD
9151ba97a8 grc: Implement grcc --output switch for hierarchical blocks
* grc: Implement --output functionality for grcc

Reference gnradio Issue #2799.

This commit adjusts some logic and code to enable the --output switch
for grcc.
Prior to this commit, grcc would only output to the GRC_HIER_PATH.
The commit adjusts the various Generators in grc/core/generator to
consistently use
output_dir for the output directory.
If it's None, then take from the platform.config.hier_block_lib_dir
attribute which can be set via the
GRC_HIER_PATH env var.
The cpp_top_block generator was also modified to remote its __init__ function
which appeared identical to its base TopBlockGenerator.
I did not test c++ GRC output.

* Make output directory if does not exist
* Duplicate TopBlockGenerator __init__ without .py extension; base class object
* Typo in os.makedirs kwarg
* Added _warnings method from TopBlockGenerator

Signed-off-by: Jared Dulmage <jared.dulmage@caliola.com>
2021-09-27 11:04:13 -04:00
Oleksandr Kravchuk
43e6a43e3d python: Remove unnecessary 'from __future__ import'
All of the removed `from __future__ import` were needed in older
versions of Python (mostly 2.5.x and below) but later became mandatory
in most versions of Python 3 hence are not necessary anymore.

More specifically, according to __future__.py[1]:
- unicode_literals is part of Python since versions 2.6.0 and 3.0.0;
- print_function is part of Python since versions 2.6.0 and 3.0.0;
- absolute_import is part of Python since versions 2.5.0 and 3.0.0;
- division is part of Python since versions 2.2.0 and 3.0.0;

Get rid of those unnecessary imports to slightly clean up the codebase.

[1] https://github.com/python/cpython/blob/master/Lib/__future__.py
2020-08-03 11:40:27 +02:00
devnulling
9a453c2ca6 Update license header to SPDX format 2020-01-27 19:56:21 -08:00
Sebastian Koslowski
113d266349 grc: added yaml/mako support
Includes basic converter from XML/Cheetah to YAML/Mako based block format.
2017-06-29 09:16:49 -07:00
Sebastian Koslowski
a2960ceb18 Merge remote-tracking branch 'upstream/next' into gtk3 2016-11-17 21:21:08 +01:00
Sebastian Koslowski
68ca7e3409 grc: changes to grcc CLI 2016-09-28 09:28:39 +02:00
Sebastian Koslowski
79699ba530 grc: rewrite grcc 2016-09-23 21:13:36 +02:00