29 Commits

Author SHA1 Message Date
Marcus Müller
2c9f52d7e9 GRC: when passing arguments to terminal emulator: individually
The joined argument string is only useful for logging; some terminal
emulators seem to accept it (which probably means they pass their one
argument to a shell), others fail (gnome-terminal, alacritty, …).

By splitting the arguments, this should work on all terminal emulators.

Tested against xterm and alacritty, the former still works, the latter
now works.

Signed-off-by: Marcus Müller <mmueller@gnuradio.org>
2024-05-08 18:46:47 -04:00
Volker Schroer
f28db3236d cmake: replace deprecated distutils
* gnuradio: replace deprecated distutils

Check if python packaging is available

Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>

* Add packaging requirement

Signed-off-by: Volker Schroer <3470424+dl1ksv@users.noreply.github.com>
2021-12-20 14:33:01 -05:00
Josh Morman
b7828c950c grc: pep8 formatting
Signed-off-by: Josh Morman <jmorman@gnuradio.org>
2021-11-24 14:41:53 -05:00
mormj
7a5fcdbe26 grc: remove gnome-terminal deprecation warning
When running a "No GUI" flowgraph from GRC, it gives the following
deprecation warning:
Option “-e” is deprecated and might be removed in a later version of gnome-terminal.
Use “-- ” to terminate the options and put the command line to execute after it.

This follows the suggested fix to update the deprecation

Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
2020-12-17 07:55:35 -05:00
Clayton Smith
d07416e123 grc: fix pylint C0303: Trailing whitespace 2020-10-20 15:16:48 +02: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
japm48
44bbd17d5b grc: use cmake --build instead of make
This allows the use of other toolchains (ninja, MSVC, etc.).
Also, use all available CPU cores (equivalent of "make -j$(nproc)").
2020-04-26 18:59:26 -04:00
japm48
6bf94efb6a grc: start flowgraph process in its folder
This allows the use of predictable relative paths.
2020-04-26 18:59:26 -04:00
devnulling
9a453c2ca6 Update license header to SPDX format 2020-01-27 19:56:21 -08:00
Håkon Vågsether
4fc8dcef66 Added C++ support to gr-analog, gr-blocks and grc 2018-12-18 23:17:34 +01:00
Håkon Vågsether
be8dafb747 Add C++ generation 2018-11-23 00:51:15 +01:00
Brennan Ashton
ea08f8a6e5 grc: Fix flow graph stdout and clean up process on termination 2018-11-12 16:27:32 -08:00
Johannes Demel
bf71cbc67f GRC: fix failing thread run
In Py3k a string decode might trigger an error because it is already a unicode string. This is not the case in Py2k land. Thus, add a check.
2018-11-12 14:11:05 -08:00
Volker Schroer
925662db77 Decode stdout as utf-8 for the fg execution console
If the executed script sends some ( error ) messages you get a lot of error messages like

    Traceback (most recent call last):
      File "/usr/local/gnuradio/lib/python3.6/dist-packages/gnuradio/grc/core/Messages.py", line 117, in send_verbose_exec
        send(verbose)
       File "/usr/local/gnuradio/lib/python3.6/dist-packages/gnuradio/grc/core/Messages.py", line 52, in send
    messenger(_indent + message)
    TypeError: must be str, not bytes

But you don't find out the reason of this error. The return type of os.read seems to have changed between python 2.7 and python 3.
The decode function fixes this issue and you get valuable messages.
2018-08-24 21:17:22 +02:00
Andrej Rode
afe895109c Merge branch 'python3_fix' into next
Manual merge conflict resolution has been applied to following
conflicts:

* Typos:
	* gnuradio-runtime/python/gnuradio/ctrlport/GrDataPlotter.py
	* gr-blocks/python/blocks/qa_wavfile.py
	* gr-filter/examples/gr_filtdes_api.py
	* grc/blocks/parameter.xml
	* gr-uhd/python/uhd/__init__.py

* ValueError -> RuntimeError:
	* gr-blocks/python/blocks/qa_hier_block2.py

* relative Imports & other Py3k:
	* gr-digital/python/digital/psk_constellations.py
	* gr-digital/python/digital/qam_constellations.py
	* gr-digital/python/digital/test_soft_decisions.py
	* gr-digital/python/digital/gfsk.py

* SequenceCompleter:
	* gr-utils/python/modtool/modtool_add.py
	* gr-utils/python/modtool/modtool_rename.py
	* gr-utils/python/modtool/modtool_rm.py

* Updated API on next:
	* gr-blocks/grc/blocks_file_source.xml
	* gr-blocks/python/blocks/qa_file_source_sink.py
	* gr-qtgui/grc/qtgui_time_sink_x.xml

* GRC Py3k Updates:
	* grc/core/Block.py
	* grc/core/Constants.py
	* grc/core/Platform.py
	* grc/core/utils/odict.py
	* grc/gui/Actions.py
	* grc/gui/Block.py
	* grc/gui/Executor.py
	* grc/gui/Port.py
2018-06-24 00:03:35 +02:00
Martin Braun
e5a9613803 Merge branch 'master' into next 2018-02-03 16:58:43 +01:00
luz.paz
25c099f63f Comment typo fixing.
Luzpaz went ahead and found typos using `codespell -q 3`.
2018-02-03 14:58:58 +01:00
Sebastian Koslowski
4dc12db062 grc: gtk minor fixes 2017-03-09 20:17:06 +01:00
Sebastian Koslowski
a2960ceb18 Merge remote-tracking branch 'upstream/next' into gtk3 2016-11-17 21:21:08 +01:00
Ben Hilburn
cd54d8fa2e Backport GRC Python code for Python-2.6.6+ 2016-10-17 17:07:23 -04:00
Seth Hitefield
871fa4b213 grc: gtk3: Renamed the ActionHandler to Application 2016-09-23 16:18:10 -04:00
Sebastian Koslowski
0dcff2b1b2 grc: move run command getter to core 2016-09-23 21:12:03 +02:00
Sebastian Koslowski
b9881b6ff5 grc: py3k compat using python-modernize 2016-06-09 14:47:35 +02:00
Sebastian Koslowski
8b60dcefe8 grc: gtk3: remove some deprecated warnings 2016-06-01 17:48:12 +02:00
Sebastian Koslowski
5bfbb29f0d grc-refactor: replace some unnecessary getters 2016-06-01 17:47:01 +02:00
Seth Hitefield
f337362360 grc: Main window opens with pygobject and gtk3. Still throws tons of errors. 2016-05-24 11:11:33 -04:00
Sebastian Koslowski
1e9c05a5a3 grc: fix flow graph execution (amends ActionHandler refactoring) 2016-05-23 10:45:54 +02:00
Sebastian Koslowski
b32aad9e41 grc-refactor: remove (hopefully) all deps to GR in core/ and gui/ 2016-04-05 10:10:36 +02:00
Sebastian Koslowski
fb3dafcc0e grc-refactor: move gui prefs to gui 2016-04-05 08:39:02 +02:00