* Re: branch master updated: gnu: gnuradio: Fix runtime python environment for plugins.
[not found] <20200430082115.25315.99707@vcs0.savannah.gnu.org>
@ 2020-05-01 21:29 ` Ludovic Courtès
2020-05-02 8:40 ` Guillaume Le Vaillant
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2020-05-01 21:29 UTC (permalink / raw)
To: guix-devel
Hi Guillaume,
guix-commits@gnu.org skribis:
> (native-search-paths
> + ;; Variables required to find third-party plugins at runtime.
> (list (search-path-specification
> (variable "GRC_BLOCKS_PATH")
> - (files '("/share/gnuradio/grc/blocks")))))
> + (files '("share/gnuradio/grc/blocks")))
> + (search-path-specification
> + (variable "PYTHONPATH")
> + (files (list (string-append "lib/python"
> + (version-major+minor
> + (package-version python))
> + "/site-packages"))))))
> (synopsis "Toolkit for software-defined radios")
It’s not OK to have PYTHONPATH in here because that variable “belongs”
to Python, not to GNU Radio.
A profile containing both gnuradio and python will have PYTHONPATH
correctly set. However, I guess you want to ensure that PYTHONPATH is
correct even when Python is not in the profile, right?
In that case, I’d recommend wrapping the gnuradio executables such that
PYTHONPATH is correct.
Does that make sense?
See also one of our oldest bugs: <https://issues.guix.gnu.org/issue/22138>.
(Apologies if I missed a previous discussion!)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: branch master updated: gnu: gnuradio: Fix runtime python environment for plugins.
2020-05-01 21:29 ` branch master updated: gnu: gnuradio: Fix runtime python environment for plugins Ludovic Courtès
@ 2020-05-02 8:40 ` Guillaume Le Vaillant
0 siblings, 0 replies; 2+ messages in thread
From: Guillaume Le Vaillant @ 2020-05-02 8:40 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 2336 bytes --]
Hi,
Ludovic Courtès <ludo@gnu.org> skribis:
> Hi Guillaume,
>
> guix-commits@gnu.org skribis:
>
>> (native-search-paths
>> + ;; Variables required to find third-party plugins at runtime.
>> (list (search-path-specification
>> (variable "GRC_BLOCKS_PATH")
>> - (files '("/share/gnuradio/grc/blocks")))))
>> + (files '("share/gnuradio/grc/blocks")))
>> + (search-path-specification
>> + (variable "PYTHONPATH")
>> + (files (list (string-append "lib/python"
>> + (version-major+minor
>> + (package-version python))
>> + "/site-packages"))))))
>> (synopsis "Toolkit for software-defined radios")
>
> It’s not OK to have PYTHONPATH in here because that variable “belongs”
> to Python, not to GNU Radio.
>
> A profile containing both gnuradio and python will have PYTHONPATH
> correctly set. However, I guess you want to ensure that PYTHONPATH is
> correct even when Python is not in the profile, right?
>
> In that case, I’d recommend wrapping the gnuradio executables such that
> PYTHONPATH is correct.
>
> Does that make sense?
>
> See also one of our oldest bugs: <https://issues.guix.gnu.org/issue/22138>.
>
> (Apologies if I missed a previous discussion!)
>
> Thanks,
> Ludo’.
The gnuradio-companion program generates a Python script based on the
user's flowchart of signal processing blocks, and then executes it.
Some extra "gnuradio blocks" can be added as plugin, like the
gnuradio-osmosdr and gnuradio-iqbalance packages. For the Python script
to be able to import the plugins installed in the Guix profile (or Guix
environment), the PYTHONPATH variable must be defined in the profile (or
environment).
I got the idea of putting PYTHONPATH in native-search-paths from the
Gajim package. I guess it will have to be fixed as well.
What would be the best way to have PYTHONPATH set to the runtime profile
or environment without putting it in native-search-paths?
- Make python a native-input?
- Wrap binaries with
"PYTHONPATH=$GUIX_ENVIRONMENT/lib/python/3.7/site-packages:$GUIX_PROFILE/lib/python/3.7/site-packages:$PYTHONPATH"?
- Something else?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-02 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20200430082115.25315.99707@vcs0.savannah.gnu.org>
2020-05-01 21:29 ` branch master updated: gnu: gnuradio: Fix runtime python environment for plugins Ludovic Courtès
2020-05-02 8:40 ` Guillaume Le Vaillant
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).