Ticket #151 (defect)
Opened 2 years ago
Last modified 2 months ago
python path not correct in installed scripts
Status: new
| Reported by: | gdt | Assigned to: | eb |
|---|---|---|---|
| Priority: | low | Milestone: | to-be-decided |
| Component: | gnuradio-examples | Version: | 3.0.3 |
| Keywords: | python pa | Cc: | |
Many scripts have #!/usr/bin/env python at the top, and this has two problems:
- python may be installed as python2.4 (e.g. on pkgsrc)
- GNU Radio installs python libraries (.py and shlibs) into the detected python's site directory, and thus scripts that use such libraries must use the same python version, rather than changing when the system default, if any, changes.
Thus, it is desired to bind the script to the detected python version at build/install time.
There are at least two plausible approaches:
- For each script foo, move it to foo.in, and start it with @PYTHON@ and add the script to configure.ac. This is conceptually easy, but a lot of work and annoying.
- Create a new install script (perhaps via a .in variant and configure) that performs this substitution at install time, and change */Makefile.am to use the new script.
Change History
05/11/07 17:50:13: Modified by gdt
- type changed from enhancement to defect.
10/04/08 18:53:14: Modified by jblum
python's distutils has a mechanism to take care of this. Perhaps it can be ported to the build

This should have been defect. The scripts fail to run on NetBSD/pkgsrc.