Re: [Hamlib-developer] Building Python bindings
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: Nate B. <n0...@n0...> - 2025-04-07 07:30:14
|
* On 2025 06 Apr 23:25 -0500, Phil wrote: > Thank you for reading this. > > The recent discussion about using rigctl within Python code has rekindled my > interest in this subject. I don't remember ever being able to build the > Python bindings and so I had used rigctl instead, which is still working. I > decided to try to build the bindings today but without success. > > I do have hamlib-utils installed which gives me rigctl. > > This is what I'd tried: > > git clone https://github.com/Hamlib/Hamlib.git > cd Hamlib > > ./bootstrap > ./configure --with-python-binding > > This ends with "cannot find python". Hi Phil. I presume you're on Linux, which distribution? I just tried it here on Debian 12 and everything works as expected. I have the 'python3-dev' package installed which *should* pull in everything else (header files, etc.). Here is my 'configure' excerpt: ../hamlib/configure --prefix=$HOME/local --with-python-binding ... checking whether to build python binding... yes checking for python... /usr/bin/python checking for a version of Python >= '2.1.0'... yes checking for a version of Python >='2.1'... yes checking for the sysconfig Python package... yes checking for Python include path... -I/usr/include/python3.11 checking for Python library path... -L/usr/lib/x86_64-linux-gnu -lpython3.11 checking for Python site-packages path... /home/nate/local/lib/python3.11/site-packages checking for Python platform specific site-packages path... /home/nate/local/lib/python3.11/site-packages checking python extra libraries... -ldl -lm checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions checking consistency of all components of python development environment... yes checking whether /usr/bin/python version is >= 2.1... yes checking for /usr/bin/python version... 3.11 checking for /usr/bin/python platform... linux checking for GNU default /usr/bin/python prefix... ${prefix} checking for GNU default /usr/bin/python exec_prefix... ${exec_prefix} checking for /usr/bin/python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.11/site-packages checking for /usr/bin/python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.11/site-packages ... Package features: With C++ binding yes With Perl binding no With Python binding yes With TCL binding no With Lua binding no With rigmem XML support no With Readline support yes With INDI support no ... Then 'make' and 'make install'. And since I am installing into my home directory I have the following file: $HOME/.local/lib/python3.11/site-packages/home_local.pth which contains: /home/nate/local/lib/python3.11/site-packages I successfully ran 'py3test.py' from the bindings directory. 73, Nate -- "The optimist proclaims that we live in the best of all possible worlds. The pessimist fears this is true." Web: https://www.n0nb.us Projects: https://github.com/N0NB GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819 |