gnuradio / pybombs

PyBOMBS (Python Build Overlay Managed Bundle System) is the GNU Radio install management system for resolving dependencies and pulling in out-of-tree projects.
https://gnuradio.org
GNU General Public License v3.0
414 stars 191 forks source link

Unable to create a simple `pip install` recipe #619

Closed mcdiarmid closed 4 months ago

mcdiarmid commented 2 years ago

Running pybombs v2.3.5 (python3 -m pip install pybombs==2.3.5) on Ubuntu 20.04.

Take gr-recipes/setuptools.lwr for example. This will currently run apt install python3-setuptools >= 0.6. I end up with version 45.2.0 on my machine. Logically I see that deb is the first option under satisfy, which seems to trigger the use of apt install. So following the same train of thought, I modify this recipe file to contain the following in an attempt to force pybombs to use pip:

category: baseline
depends:
- python
satisfy:
  pip: setuptools==45.2.0
satisfy@python3:
  pip: setuptools==45.2.0

I create a blank prefix, and try to install using this new recipe:

pybombs prefix init testprefix
pybombs -vv install setuptools

Output:

...
[DEBUG] Attempting to add binary package manager pip
[DEBUG] Using pip executable: pip3
[DEBUG] pip is supported!
[DEBUG] Attempting to add binary package manager pkgconfig
[DEBUG] pkgconfig is supported!
[DEBUG] Attempting to add binary package manager cmd
[DEBUG] cmd is supported!
[DEBUG] Using binary packagers: ['apt', 'pymod', 'pip', 'pkgconfig', 'cmd']
[INFO] Phase 1: Creating install tree and installing binary packages:
[TRACE] Checking if package `setuptools' goes into tree...
[DEBUG] Checking if package setuptools is installable...
[TRACE] Loading recipe file: /home/c.mcdiarmid/.pybombs/recipes/gr-recipes/setuptools.lwr
[TRACE] Loading template file: /home/c.mcdiarmid/.local/lib/python3.8/site-packages/pybombs/templates/empty.lwt
[TRACE] Inheriting from file /home/c.mcdiarmid/.local/lib/python3.8/site-packages/pybombs/templates/empty.lwt
[TRACE] Loaded recipe - setuptools
[TRACE] Woohoo, this one's already cached (setuptools)
[TRACE] Woohoo, this one's already cached (setuptools)
[TRACE] exists(setuptools)
[TRACE] Parsing requirements string: None
[TRACE] exists(setuptools)
[TRACE] Parsing requirements string: None
[TRACE] exists(setuptools)
[TRACE] Parsing requirements string: setuptools == 45.2.0
[TRACE] Calling ev for recursive satisfier rule evaluation
[TRACE] exists(setuptools)
[TRACE] Parsing requirements string: None
[TRACE] exists(setuptools)
[TRACE] Parsing requirements string: None
[DEBUG] Package setuptools is not installable.
[ERROR] Package has no install method: setuptools
[DEBUG] Unresolved install path.

I'm going to have a dig through the repo to understand this, but to me there should be a README or wiki page briefly outlining how to construct .lwr files for common cases such as these. If I get a grasp on how to do this, I'd be happy to make such a page or doc. Thank you