gnuradio / pmt

pmt
GNU Lesser General Public License v3.0
11 stars 11 forks source link

Install the pmt Python library independent from GNURadio #69

Closed Nicko98 closed 1 year ago

Nicko98 commented 1 year ago

TL;DR: How do I just install the python pmt library in a conda environment without installing gnuradio-core? Is there a conda package I can just install?

Hi, I'm working on a GNURadio project where a flowgraph is running on a server and a client sends pmt messages to the flowgraph via ZeroMQ. I've written the client side in python and now want to distribute it. I've made a python package and up until now install all dependencies and the python package via a bash script into a conda environment. What's the easiest way to install the python pmt library? Right now I install gnuradio-core (conda install gnuradio-core), which includes pmt, but I assume that's way more overhead than necessary.

jsallay commented 1 year ago

I'm guessing that you are using GNURadio 3.10.x (or earlier). The pmt library is embedded in the GNURadio source. There isn't an easy way to separate it out.

This repo is for the GNURadio 4.0 pmts. We recognized your exact use case and want to make it easier to use the pmt library outside of GNURadio. Unfortunately, the new pmt library is not compatible with the old pmts. (It does have a much more pleasant user interface and is more performant).

I realize that it isn't ideal, but I would probably just keep installing the GNURadio core, though @ryanvolz may have better ideas that are conda specific.

@ryanvolz Would it be difficult to put the pmt library in its own conda package? I don't believe that it has any dependencies on the gnuradio runtime.

ryanvolz commented 1 year ago

You're right that it's not currently possible to install the GR 3-era pmt library separately, although I suppose it could be made so in the same way that I split out things like gnuradio-uhd. Indeed, the library itself does not link to anything else in GNU Radio. With GR 4 I imagine I would package pmt separately anyway since it does indeed have its own repo here. Just a few questions to answer in order to do this right:

  1. What do we call the package so that it will be logically forward-compatible (or is this not desirable)? I.e. what makes sense for both the GR 3 and 4 eras? Presumably pmt, but maybe gnuradio-pmt?
  2. What do you require/expect in the GR 3-era pmt package? I think it would have the libgnuradio-pmt.so* library, pmt headers, the pmt Python bindings, and the gnuradio-pmt*.cmake files.
Nicko98 commented 1 year ago

Thanks for the quick response!

  1. I'd love to see it called "pmt", but since there is already an unrelated pip package called "pmt", "gnuradio-pmt" is probably better.

  2. I'm not totally sure, what I need, but I definitely need the python bindings, which probably depend on the libgnuradio-pmt.so* library. I just want to type "import pmt".

One extra question: One of the users I do this for prefers MATLAB over Python/Numpy. There is no way to use pmt in MATLAB right now, isn't it?

ryanvolz commented 1 year ago

@Nicko98 gnuradio-pmt package is now available, and you can import pmt to your heart's content.

Nicko98 commented 1 year ago

@ryanvolz Thanks for the quick help!