[Hamlib-commits] Hamlib -- Ham radio control libraries branch master updated. 198c14818a5c0f23a1dc8
Library to control radio transceivers and receivers
Brought to you by:
n0nb
From: n0nb <n0...@us...> - 2025-01-21 01:53:38
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Hamlib -- Ham radio control libraries". The branch, master has been updated via 198c14818a5c0f23a1dc8bd9bd577a4b4c5f2957 (commit) via 4281a5ef7d32fe9adfb48de6fe52ace7b63e7d6d (commit) via 704238da2f172fdfeca1b094d9978fccf4ef9f7e (commit) via af1cab0619c2cead0fb2dbbb1ef380492a1d712d (commit) via e3c67131cff0ec24d7142449a98287b33926af2f (commit) via 5401dfeca89f3e735b12742a6f7ee9221bf9b8bc (commit) via c0d0e6ff24e43b97885dc8a4e01c6638a03f3bbc (commit) via 09b58274b320f7c36316508510674fa371bd9076 (commit) via 8041563c2e628a8fda9452f5e571ddfe184caaab (commit) via cfc199dac2a4df3995e8214fad48d7eb99935567 (commit) via f76864a3c46d1ce9a4ec47538131e09f382fea62 (commit) via ad50b0c7837aa4f8759082fdde279178c0d81c3f (commit) via 0c5c34f8a5515b0064635f9b2e6f210c01280eca (commit) via 8c3f13764d9af4c6ecf112657864b4262c097575 (commit) via 6a4da2cbc5111f708efc7dd8735c41979c27a5c4 (commit) via e4019531601331ea79be61dfbdd705a4ed78385a (commit) via 4980beb9a9f28a2e6945d19cffd17820c9408911 (commit) via 7a5bb89690837c53ce4f9c7f7507c75de2fd2092 (commit) via 8aa487afb8a335b0550b0713a25e2c61d34058e4 (commit) via 35f86232fada1cfd0af61a1efd97fb175025f1b4 (commit) via 517a8918ab88fbd80ba45d87c0884e3d1ca67856 (commit) via bedbfff8c4c574dad9bd14cc620d4c2683afe9ed (commit) via a985b50eea15f8f8c8f376888e639dbb7c05daaa (commit) via 24d67437b78aeb9d0c7925450bda9839ebd7c31a (commit) via 46143578ae3853db6054e73be5867bd69cadff29 (commit) via 8636901bf3a74a6a5af5c89df12393adcc0ae3f6 (commit) via 33adef942e4e3227be56d0b9a2f5a3b5b7b43010 (commit) via d2065fe781b1213c1458565eb4fe40227bb657f3 (commit) via d1e0e3f204d3b0f5b3a17e83a50d360184136e0d (commit) via b2b8586c93c3ce501cd6a46da5d7352668c87f15 (commit) via 3eefab46a9ab631577f1bba9ca42752afe3f8b64 (commit) via 1ad817dea9991c5ccc86553fc8e8c5f9914707e8 (commit) via 181831bbd81c61b3d3aced3a08c8a74213d88235 (commit) via 61f3a817d339d7010b192f6a588bfe13620c803c (commit) via 083fed77f298d4a006b52dfbd9ebad549e54ec15 (commit) via 820c28e63f01142c1a607b7bc86e458af1f1a14d (commit) via 3222289ef501ff0bf63810b909c80bbc7c244294 (commit) via b3118906311b0d5dd68883ee6aefb12f0c81e469 (commit) via b3ef41354d9c7f97959e65d09aadb53bbb1d3232 (commit) via a8f5ad0b6ff5453325fc5ca304818727ad9ad0de (commit) via ab63103f6b553b72eb24c01f9fc4028a05e8e149 (commit) via a8a5229147d689cd01294538d82399597b22b5b0 (commit) via 7d535564bd5b283f2c4722b632aefb3d0ab764e3 (commit) from 028d750249ab00c8c362598c838b15e8aa6a2951 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 198c14818a5c0f23a1dc8bd9bd577a4b4c5f2957 Author: Michael Black W9MDB <mdb...@ya...> Date: Mon Jan 20 16:54:16 2025 -0600 Reduce error message level in rig_set_freq...left over from debugging diff --git a/src/rig.c b/src/rig.c index fce0b168a..a380cf18a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -2373,7 +2373,7 @@ int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_set_cache_freq(rig, vfo, freq_new); - rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s, save=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(vfo_save)); + rig_debug(RIG_DEBUG_VERBOSE, "%s: vfo=%s, save=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(vfo_save)); if (vfo != vfo_save && vfo != RIG_VFO_CURR) { HAMLIB_TRACE; commit 4281a5ef7d32fe9adfb48de6fe52ace7b63e7d6d Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:51:24 2025 -0600 Revert "Reapply "Update python binding to place some files in site-packages/Hamlib"" This reverts commit 704238da2f172fdfeca1b094d9978fccf4ef9f7e. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index ee20d3810..34272b70c 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -83,47 +83,55 @@ uninstall-perl: ## Hamlib-pl.mk endif # Perl + if ENABLE_PYTHON +########################################## +# Python binding + +pyexec_ltlib = _Hamlib.la + +MOSTLYCLEANFILES += hamlibpy_wrap.c Hamlib.py *.pyc +BUILT_SOURCES += hamlibpy_wrap.c Hamlib.py -############################################################################## -# 1. We declare a Python extension using 'pyexec_LTLIBRARIES'. -# - Tells Automake: “Install this .so into $(pyexecdir).” -# - We override 'pyexec_ltlibdir' to place it in a subdirectory: Hamlib -############################################################################## -pyexec_LTLIBRARIES = _Hamlib.la -pyexec_ltlibdir = $(pyexecdir)/Hamlib +# Set by AM_CONDITIONAL in configure.ac +if PYVER_3 +pytest = py3test.py +else !PYVER_3 +pytest = pytest.py +endif +# PYVER_3 + +example_DATA += $(pytest) + +nodist_pyexec_PYTHON = Hamlib.py +nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c -_Hamlib_la_SOURCES = hamlibpy_wrap.c _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version -_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) - -############################################################################## -# 2. We declare a set of Python (.py) files using a custom primary, e.g. -# 'myhamlib_PYTHON'. Automake installs them into 'myhamlibdir' by default. -############################################################################## -myhamlib_PYTHON = \ - __init__.py \ - Hamlib.py - -# Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib -myhamlibdir = $(pyexecdir)/Hamlib - -############################################################################## -# 3. Distribute these files (so they're included in 'make dist' tarballs). -############################################################################## -EXTRA_DIST += \ - __init__.py \ - Hamlib.py - -all-py: +_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) +_Hamlib_ladir = $(pyexecdir) +_Hamlib_la_LTLIBRARIES = $(pyexec_ltlib) + +all-py: $(pyexec_ltlib) + +check-py: all-py + $(AM_V_at)PYTHONPATH=$(builddir):$(builddir)/.libs \ + $(PYTHON) $(srcdir)/$(pytest) \ + || echo "Python test failed" 1>&2 + +Hamlib.py: hamlibpy_wrap.c + +hamlibpy_wrap.c: hamlib.swg $(SWGDEP) + $(AM_V_GEN)$(SWIG) -python $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/bindings \ + -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg + install-py: - @true -############################################################################## -# 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' -# You do NOT need them. Automake already knows how to install these files. -############################################################################## +clean-py: +distclean-py: +uninstall-py: + +endif +# Python -endif # ENABLE_PYTHON if ENABLE_TCL ########################################## diff --git a/bindings/py3test.py b/bindings/py3test.py index 9c156234e..52f85e1e7 100755 --- a/bindings/py3test.py +++ b/bindings/py3test.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys -import site # Change this path to match your "make install" path -sys.path.append('/usr/local/lib/python3.12/site-packages') +sys.path.append('/usr/local/lib/python3.10/site-packages') ## Uncomment to run this script from an in-tree build (or adjust to the ## build directory) without installing the bindings. @@ -18,9 +17,7 @@ def StartUp(): print("%s: Python %s; %s\n" \ % (sys.argv[0], sys.version.split()[0], Hamlib.cvar.hamlib_version)) - print(site.getsitepackages()) - - Hamlib.rig_set_debug(0) + Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) # Init RIG_MODEL_DUMMY my_rig = Hamlib.Rig(Hamlib.RIG_MODEL_DUMMY) commit 704238da2f172fdfeca1b094d9978fccf4ef9f7e Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:50:59 2025 -0600 Reapply "Update python binding to place some files in site-packages/Hamlib" This reverts commit af1cab0619c2cead0fb2dbbb1ef380492a1d712d. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 34272b70c..ee20d3810 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -83,55 +83,47 @@ uninstall-perl: ## Hamlib-pl.mk endif # Perl - if ENABLE_PYTHON -########################################## -# Python binding - -pyexec_ltlib = _Hamlib.la - -MOSTLYCLEANFILES += hamlibpy_wrap.c Hamlib.py *.pyc -BUILT_SOURCES += hamlibpy_wrap.c Hamlib.py -# Set by AM_CONDITIONAL in configure.ac -if PYVER_3 -pytest = py3test.py -else !PYVER_3 -pytest = pytest.py -endif -# PYVER_3 - -example_DATA += $(pytest) - -nodist_pyexec_PYTHON = Hamlib.py -nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c +############################################################################## +# 1. We declare a Python extension using 'pyexec_LTLIBRARIES'. +# - Tells Automake: “Install this .so into $(pyexecdir).” +# - We override 'pyexec_ltlibdir' to place it in a subdirectory: Hamlib +############################################################################## +pyexec_LTLIBRARIES = _Hamlib.la +pyexec_ltlibdir = $(pyexecdir)/Hamlib +_Hamlib_la_SOURCES = hamlibpy_wrap.c _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version -_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) -_Hamlib_ladir = $(pyexecdir) -_Hamlib_la_LTLIBRARIES = $(pyexec_ltlib) - -all-py: $(pyexec_ltlib) - -check-py: all-py - $(AM_V_at)PYTHONPATH=$(builddir):$(builddir)/.libs \ - $(PYTHON) $(srcdir)/$(pytest) \ - || echo "Python test failed" 1>&2 - -Hamlib.py: hamlibpy_wrap.c - -hamlibpy_wrap.c: hamlib.swg $(SWGDEP) - $(AM_V_GEN)$(SWIG) -python $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/bindings \ - -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg - +_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) + +############################################################################## +# 2. We declare a set of Python (.py) files using a custom primary, e.g. +# 'myhamlib_PYTHON'. Automake installs them into 'myhamlibdir' by default. +############################################################################## +myhamlib_PYTHON = \ + __init__.py \ + Hamlib.py + +# Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib +myhamlibdir = $(pyexecdir)/Hamlib + +############################################################################## +# 3. Distribute these files (so they're included in 'make dist' tarballs). +############################################################################## +EXTRA_DIST += \ + __init__.py \ + Hamlib.py + +all-py: install-py: -clean-py: -distclean-py: -uninstall-py: - -endif -# Python + @true +############################################################################## +# 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' +# You do NOT need them. Automake already knows how to install these files. +############################################################################## +endif # ENABLE_PYTHON if ENABLE_TCL ########################################## diff --git a/bindings/py3test.py b/bindings/py3test.py index 52f85e1e7..9c156234e 100755 --- a/bindings/py3test.py +++ b/bindings/py3test.py @@ -1,8 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys +import site # Change this path to match your "make install" path -sys.path.append('/usr/local/lib/python3.10/site-packages') +sys.path.append('/usr/local/lib/python3.12/site-packages') ## Uncomment to run this script from an in-tree build (or adjust to the ## build directory) without installing the bindings. @@ -17,7 +18,9 @@ def StartUp(): print("%s: Python %s; %s\n" \ % (sys.argv[0], sys.version.split()[0], Hamlib.cvar.hamlib_version)) - Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) + print(site.getsitepackages()) + + Hamlib.rig_set_debug(0) # Init RIG_MODEL_DUMMY my_rig = Hamlib.Rig(Hamlib.RIG_MODEL_DUMMY) commit af1cab0619c2cead0fb2dbbb1ef380492a1d712d Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:50:30 2025 -0600 Revert "Update python binding to place some files in site-packages/Hamlib" This reverts commit 8aa487afb8a335b0550b0713a25e2c61d34058e4. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index ee20d3810..34272b70c 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -83,47 +83,55 @@ uninstall-perl: ## Hamlib-pl.mk endif # Perl + if ENABLE_PYTHON +########################################## +# Python binding + +pyexec_ltlib = _Hamlib.la + +MOSTLYCLEANFILES += hamlibpy_wrap.c Hamlib.py *.pyc +BUILT_SOURCES += hamlibpy_wrap.c Hamlib.py -############################################################################## -# 1. We declare a Python extension using 'pyexec_LTLIBRARIES'. -# - Tells Automake: “Install this .so into $(pyexecdir).” -# - We override 'pyexec_ltlibdir' to place it in a subdirectory: Hamlib -############################################################################## -pyexec_LTLIBRARIES = _Hamlib.la -pyexec_ltlibdir = $(pyexecdir)/Hamlib +# Set by AM_CONDITIONAL in configure.ac +if PYVER_3 +pytest = py3test.py +else !PYVER_3 +pytest = pytest.py +endif +# PYVER_3 + +example_DATA += $(pytest) + +nodist_pyexec_PYTHON = Hamlib.py +nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c -_Hamlib_la_SOURCES = hamlibpy_wrap.c _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version -_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) - -############################################################################## -# 2. We declare a set of Python (.py) files using a custom primary, e.g. -# 'myhamlib_PYTHON'. Automake installs them into 'myhamlibdir' by default. -############################################################################## -myhamlib_PYTHON = \ - __init__.py \ - Hamlib.py - -# Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib -myhamlibdir = $(pyexecdir)/Hamlib - -############################################################################## -# 3. Distribute these files (so they're included in 'make dist' tarballs). -############################################################################## -EXTRA_DIST += \ - __init__.py \ - Hamlib.py - -all-py: +_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) +_Hamlib_ladir = $(pyexecdir) +_Hamlib_la_LTLIBRARIES = $(pyexec_ltlib) + +all-py: $(pyexec_ltlib) + +check-py: all-py + $(AM_V_at)PYTHONPATH=$(builddir):$(builddir)/.libs \ + $(PYTHON) $(srcdir)/$(pytest) \ + || echo "Python test failed" 1>&2 + +Hamlib.py: hamlibpy_wrap.c + +hamlibpy_wrap.c: hamlib.swg $(SWGDEP) + $(AM_V_GEN)$(SWIG) -python $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/bindings \ + -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg + install-py: - @true -############################################################################## -# 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' -# You do NOT need them. Automake already knows how to install these files. -############################################################################## +clean-py: +distclean-py: +uninstall-py: + +endif +# Python -endif # ENABLE_PYTHON if ENABLE_TCL ########################################## diff --git a/bindings/py3test.py b/bindings/py3test.py index 9c156234e..52f85e1e7 100755 --- a/bindings/py3test.py +++ b/bindings/py3test.py @@ -1,9 +1,8 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys -import site # Change this path to match your "make install" path -sys.path.append('/usr/local/lib/python3.12/site-packages') +sys.path.append('/usr/local/lib/python3.10/site-packages') ## Uncomment to run this script from an in-tree build (or adjust to the ## build directory) without installing the bindings. @@ -18,9 +17,7 @@ def StartUp(): print("%s: Python %s; %s\n" \ % (sys.argv[0], sys.version.split()[0], Hamlib.cvar.hamlib_version)) - print(site.getsitepackages()) - - Hamlib.rig_set_debug(0) + Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) # Init RIG_MODEL_DUMMY my_rig = Hamlib.Rig(Hamlib.RIG_MODEL_DUMMY) commit e3c67131cff0ec24d7142449a98287b33926af2f Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:50:04 2025 -0600 Revert "Add __init__.py" This reverts commit 7a5bb89690837c53ce4f9c7f7507c75de2fd2092. diff --git a/bindings/__init__.py b/bindings/__init__.py deleted file mode 100644 index f07e10cff..000000000 --- a/bindings/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4; encoding:utf-8 -*- -# -# Copyright 2002 Ben Escoto <be...@em...> -# Copyright 2007 Kenneth Loafman <ke...@lo...> -# -# This file is part of duplicity. -# -# Duplicity is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. -# -# Duplicity is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with duplicity; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -import Hamlib - -__version__ = "4.6.1" - commit 5401dfeca89f3e735b12742a6f7ee9221bf9b8bc Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:49:49 2025 -0600 \Revert "Try to fix breakage of make distcheck on github" This reverts commit 4980beb9a9f28a2e6945d19cffd17820c9408911. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index c959e4b2e..ee20d3810 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -117,7 +117,6 @@ EXTRA_DIST += \ all-py: install-py: -Hamlib.py: @true ############################################################################## # 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' commit c0d0e6ff24e43b97885dc8a4e01c6638a03f3bbc Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:49:39 2025 -0600 Revert "Another attempt to fix github build" This reverts commit e4019531601331ea79be61dfbdd705a4ed78385a. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index b33992c56..c959e4b2e 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -115,9 +115,6 @@ EXTRA_DIST += \ __init__.py \ Hamlib.py -nodist_myhamlib_PYTHON = Hamlib.py -myhamlibdir = $(pyexecdir)/Hamlib - all-py: install-py: Hamlib.py: commit 09b58274b320f7c36316508510674fa371bd9076 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:49:02 2025 -0600 Revert "Another attempt to fix github build" This reverts commit 6a4da2cbc5111f708efc7dd8735c41979c27a5c4. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 377668e9f..b33992c56 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -105,8 +105,6 @@ myhamlib_PYTHON = \ __init__.py \ Hamlib.py -nodist_myhamlib_PYTHON = Hamlib.py - # Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib myhamlibdir = $(pyexecdir)/Hamlib @@ -117,6 +115,8 @@ EXTRA_DIST += \ __init__.py \ Hamlib.py +nodist_myhamlib_PYTHON = Hamlib.py +myhamlibdir = $(pyexecdir)/Hamlib all-py: install-py: commit 8041563c2e628a8fda9452f5e571ddfe184caaab Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:48:51 2025 -0600 Revert "Another attempt to fix github build" This reverts commit 8c3f13764d9af4c6ecf112657864b4262c097575. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 6bc959b8f..377668e9f 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -107,8 +107,6 @@ myhamlib_PYTHON = \ nodist_myhamlib_PYTHON = Hamlib.py -Hamlib.py: hamlib_wrap.c - # Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib myhamlibdir = $(pyexecdir)/Hamlib commit cfc199dac2a4df3995e8214fad48d7eb99935567 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:48:38 2025 -0600 Revert "Another attempt to fix github build" This reverts commit 0c5c34f8a5515b0064635f9b2e6f210c01280eca. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 2904f3a55..6bc959b8f 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -107,8 +107,7 @@ myhamlib_PYTHON = \ nodist_myhamlib_PYTHON = Hamlib.py -Hamlib.py: hamlibpy_wrap.c - @true +Hamlib.py: hamlib_wrap.c # Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib myhamlibdir = $(pyexecdir)/Hamlib @@ -123,6 +122,7 @@ EXTRA_DIST += \ all-py: install-py: +Hamlib.py: @true ############################################################################## # 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' commit f76864a3c46d1ce9a4ec47538131e09f382fea62 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:48:28 2025 -0600 Revert "One more time before I revert all of this" This reverts commit ad50b0c7837aa4f8759082fdde279178c0d81c3f. diff --git a/bindings/Makefile.am b/bindings/Makefile.am index b27be164f..2904f3a55 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -105,6 +105,8 @@ myhamlib_PYTHON = \ __init__.py \ Hamlib.py +nodist_myhamlib_PYTHON = Hamlib.py + Hamlib.py: hamlibpy_wrap.c @true @@ -119,7 +121,6 @@ EXTRA_DIST += \ Hamlib.py -clean-py: all-py: install-py: @true commit ad50b0c7837aa4f8759082fdde279178c0d81c3f Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:43:43 2025 -0600 One more time before I revert all of this diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 2904f3a55..b27be164f 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -105,8 +105,6 @@ myhamlib_PYTHON = \ __init__.py \ Hamlib.py -nodist_myhamlib_PYTHON = Hamlib.py - Hamlib.py: hamlibpy_wrap.c @true @@ -121,6 +119,7 @@ EXTRA_DIST += \ Hamlib.py +clean-py: all-py: install-py: @true commit 0c5c34f8a5515b0064635f9b2e6f210c01280eca Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:15:19 2025 -0600 Another attempt to fix github build diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 6bc959b8f..2904f3a55 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -107,7 +107,8 @@ myhamlib_PYTHON = \ nodist_myhamlib_PYTHON = Hamlib.py -Hamlib.py: hamlib_wrap.c +Hamlib.py: hamlibpy_wrap.c + @true # Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib myhamlibdir = $(pyexecdir)/Hamlib @@ -122,7 +123,6 @@ EXTRA_DIST += \ all-py: install-py: -Hamlib.py: @true ############################################################################## # 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' commit 8c3f13764d9af4c6ecf112657864b4262c097575 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 16:04:01 2025 -0600 Another attempt to fix github build diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 377668e9f..6bc959b8f 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -107,6 +107,8 @@ myhamlib_PYTHON = \ nodist_myhamlib_PYTHON = Hamlib.py +Hamlib.py: hamlib_wrap.c + # Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib myhamlibdir = $(pyexecdir)/Hamlib commit 6a4da2cbc5111f708efc7dd8735c41979c27a5c4 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 15:59:30 2025 -0600 Another attempt to fix github build diff --git a/bindings/Makefile.am b/bindings/Makefile.am index b33992c56..377668e9f 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -105,6 +105,8 @@ myhamlib_PYTHON = \ __init__.py \ Hamlib.py +nodist_myhamlib_PYTHON = Hamlib.py + # Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib myhamlibdir = $(pyexecdir)/Hamlib @@ -115,8 +117,6 @@ EXTRA_DIST += \ __init__.py \ Hamlib.py -nodist_myhamlib_PYTHON = Hamlib.py -myhamlibdir = $(pyexecdir)/Hamlib all-py: install-py: commit e4019531601331ea79be61dfbdd705a4ed78385a Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 15:58:44 2025 -0600 Another attempt to fix github build diff --git a/bindings/Makefile.am b/bindings/Makefile.am index c959e4b2e..b33992c56 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -115,6 +115,9 @@ EXTRA_DIST += \ __init__.py \ Hamlib.py +nodist_myhamlib_PYTHON = Hamlib.py +myhamlibdir = $(pyexecdir)/Hamlib + all-py: install-py: Hamlib.py: commit 4980beb9a9f28a2e6945d19cffd17820c9408911 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 15:52:35 2025 -0600 Try to fix breakage of make distcheck on github diff --git a/bindings/Makefile.am b/bindings/Makefile.am index ee20d3810..c959e4b2e 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -117,6 +117,7 @@ EXTRA_DIST += \ all-py: install-py: +Hamlib.py: @true ############################################################################## # 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' commit 7a5bb89690837c53ce4f9c7f7507c75de2fd2092 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 15:38:38 2025 -0600 Add __init__.py diff --git a/bindings/__init__.py b/bindings/__init__.py new file mode 100644 index 000000000..f07e10cff --- /dev/null +++ b/bindings/__init__.py @@ -0,0 +1,25 @@ +# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4; encoding:utf-8 -*- +# +# Copyright 2002 Ben Escoto <be...@em...> +# Copyright 2007 Kenneth Loafman <ke...@lo...> +# +# This file is part of duplicity. +# +# Duplicity is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2 of the License, or (at your +# option) any later version. +# +# Duplicity is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with duplicity; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +import Hamlib + +__version__ = "4.6.1" + commit 8aa487afb8a335b0550b0713a25e2c61d34058e4 Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 19 15:28:05 2025 -0600 Update python binding to place some files in site-packages/Hamlib https://github.com/Hamlib/Hamlib/issues/1645 diff --git a/bindings/Makefile.am b/bindings/Makefile.am index 34272b70c..ee20d3810 100644 --- a/bindings/Makefile.am +++ b/bindings/Makefile.am @@ -83,55 +83,47 @@ uninstall-perl: ## Hamlib-pl.mk endif # Perl - if ENABLE_PYTHON -########################################## -# Python binding - -pyexec_ltlib = _Hamlib.la - -MOSTLYCLEANFILES += hamlibpy_wrap.c Hamlib.py *.pyc -BUILT_SOURCES += hamlibpy_wrap.c Hamlib.py -# Set by AM_CONDITIONAL in configure.ac -if PYVER_3 -pytest = py3test.py -else !PYVER_3 -pytest = pytest.py -endif -# PYVER_3 - -example_DATA += $(pytest) - -nodist_pyexec_PYTHON = Hamlib.py -nodist__Hamlib_la_SOURCES = hamlibpy_wrap.c +############################################################################## +# 1. We declare a Python extension using 'pyexec_LTLIBRARIES'. +# - Tells Automake: “Install this .so into $(pyexecdir).” +# - We override 'pyexec_ltlibdir' to place it in a subdirectory: Hamlib +############################################################################## +pyexec_LTLIBRARIES = _Hamlib.la +pyexec_ltlibdir = $(pyexecdir)/Hamlib +_Hamlib_la_SOURCES = hamlibpy_wrap.c _Hamlib_la_LDFLAGS = -no-undefined -module -avoid-version -_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) -_Hamlib_ladir = $(pyexecdir) -_Hamlib_la_LTLIBRARIES = $(pyexec_ltlib) - -all-py: $(pyexec_ltlib) - -check-py: all-py - $(AM_V_at)PYTHONPATH=$(builddir):$(builddir)/.libs \ - $(PYTHON) $(srcdir)/$(pytest) \ - || echo "Python test failed" 1>&2 - -Hamlib.py: hamlibpy_wrap.c - -hamlibpy_wrap.c: hamlib.swg $(SWGDEP) - $(AM_V_GEN)$(SWIG) -python $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS) -I$(top_srcdir)/bindings \ - -o $@ $$(test -f hamlib.swg || echo '$(srcdir)/')hamlib.swg - +_Hamlib_la_LIBADD = $(top_builddir)/src/libhamlib.la $(PYTHON_LIBS) + +############################################################################## +# 2. We declare a set of Python (.py) files using a custom primary, e.g. +# 'myhamlib_PYTHON'. Automake installs them into 'myhamlibdir' by default. +############################################################################## +myhamlib_PYTHON = \ + __init__.py \ + Hamlib.py + +# Place them in the exact same directory as the extension: $(pyexecdir)/Hamlib +myhamlibdir = $(pyexecdir)/Hamlib + +############################################################################## +# 3. Distribute these files (so they're included in 'make dist' tarballs). +############################################################################## +EXTRA_DIST += \ + __init__.py \ + Hamlib.py + +all-py: install-py: -clean-py: -distclean-py: -uninstall-py: - -endif -# Python + @true +############################################################################## +# 4. Remove any custom 'install-py:' or 'install-exec-local: install-py' +# You do NOT need them. Automake already knows how to install these files. +############################################################################## +endif # ENABLE_PYTHON if ENABLE_TCL ########################################## diff --git a/bindings/py3test.py b/bindings/py3test.py index 52f85e1e7..9c156234e 100755 --- a/bindings/py3test.py +++ b/bindings/py3test.py @@ -1,8 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys +import site # Change this path to match your "make install" path -sys.path.append('/usr/local/lib/python3.10/site-packages') +sys.path.append('/usr/local/lib/python3.12/site-packages') ## Uncomment to run this script from an in-tree build (or adjust to the ## build directory) without installing the bindings. @@ -17,7 +18,9 @@ def StartUp(): print("%s: Python %s; %s\n" \ % (sys.argv[0], sys.version.split()[0], Hamlib.cvar.hamlib_version)) - Hamlib.rig_set_debug(Hamlib.RIG_DEBUG_NONE) + print(site.getsitepackages()) + + Hamlib.rig_set_debug(0) # Init RIG_MODEL_DUMMY my_rig = Hamlib.Rig(Hamlib.RIG_MODEL_DUMMY) commit 35f86232fada1cfd0af61a1efd97fb175025f1b4 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 18 15:56:59 2025 -0600 Fix simulators diff --git a/simulators/simft450.c b/simulators/simft450.c index 43fb68920..859db06f9 100644 --- a/simulators/simft450.c +++ b/simulators/simft450.c @@ -418,7 +418,7 @@ int main(int argc, char *argv[]) else if (strcmp(buf, "TX;") == 0) { hl_usleep(50 * 1000); - SNPRINTF(buf, sizeof(buf), "TX+%04d;", tx); + SNPRINTF(buf, sizeof(buf), "TX%d;", tx); n = write(fd, buf, strlen(buf)); if (n < 0) { perror("TX"); } diff --git a/simulators/simic7610.c b/simulators/simic7610.c index 60ac213c1..e76c4a09c 100644 --- a/simulators/simic7610.c +++ b/simulators/simic7610.c @@ -53,6 +53,7 @@ int keyspd = 130; // 130=20WPM int ipp = 0; int tx_inhibit = 0; int dpp = 0; +int dualwatch = 0; void dumphex(const unsigned char *buf, int n) { @@ -122,6 +123,10 @@ void frameParse(int fd, unsigned char *frame, int len) return; } + int tmp = frame[2]; + frame[2] = frame[3]; + frame[3] = tmp; + switch (frame[4]) { case 0x03: @@ -201,13 +206,24 @@ void frameParse(int fd, unsigned char *frame, int len) switch (frame[5]) { - case 0x00: current_vfo = RIG_VFO_A; break; - - case 0x01: current_vfo = RIG_VFO_B; break; + case 0xd0: current_vfo = RIG_VFO_A; break; - case 0xd0: current_vfo = RIG_VFO_MAIN; break; + case 0xd1: current_vfo = RIG_VFO_B; break; - case 0xd1: current_vfo = RIG_VFO_SUB; break; + case 0xc2: + if (frame[6] == 0xfd) + { + frame[6] = dualwatch; + frame[7] = 0xfd; + n = write(fd,frame,8); + } + else + { + dualwatch = frame[6]; + frame[4]=0xfb; + frame[5]=0xfd; + n = write(fd,frame,6); + } } printf("set_vfo to %s\n", rig_strvfo(current_vfo)); @@ -796,7 +812,7 @@ int main(int argc, char **argv) while (1) { int len = frameGet(fd, buf); - printf("#1 ========================================"); + printf("#1 ========================================\n"); if (len <= 0) { diff --git a/simulators/simic9100.c b/simulators/simic9100.c index 9e6a66950..ba490d999 100644 --- a/simulators/simic9100.c +++ b/simulators/simic9100.c @@ -202,6 +202,8 @@ void frameParse(int fd, unsigned char *frame, int len) frame[4] = 0xfb; frame[5] = 0xfd; +printf("+++++++++++++++ SETTING VFO +++++++++++++++++\n"); + dump_hex(frame, 6); WRITE(fd, frame, 6); break; diff --git a/simulators/simic9700.c b/simulators/simic9700.c index cd85836d2..bfaea8baf 100644 --- a/simulators/simic9700.c +++ b/simulators/simic9700.c @@ -120,6 +120,10 @@ void frameParse(int fd, unsigned char *frame, int len) return; } + int tmp = frame[2]; + frame[2] = frame[3]; + frame[3] = tmp; + switch (frame[4]) { case 0x03: diff --git a/simulators/simxiegux6100.c b/simulators/simxiegux6100.c index 9720047e0..fc804fad8 100644 --- a/simulators/simxiegux6100.c +++ b/simulators/simxiegux6100.c @@ -77,6 +77,7 @@ frameGet(int fd, unsigned char *buf) void frameParse(int fd, unsigned char *frame, int len) { double freq; + int n=0; dumphex(frame, len); @@ -87,6 +88,10 @@ void frameParse(int fd, unsigned char *frame, int len) return; } + int tmp = frame[2]; + frame[2] = frame[3]; + frame[3] = tmp; + switch (frame[4]) { case 0x03: @@ -104,7 +109,7 @@ void frameParse(int fd, unsigned char *frame, int len) } frame[10] = 0xfd; - write(fd, frame, 11); + n = write(fd, frame, 11); break; @@ -123,7 +128,7 @@ void frameParse(int fd, unsigned char *frame, int len) } frame[7] = 0xfd; - write(fd, frame, 8); + n = write(fd, frame, 8); break; case 0x05: @@ -135,7 +140,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[4] = 0xfb; frame[5] = 0xfd; - write(fd, frame, 6); + n = write(fd, frame, 6); break; case 0x06: @@ -144,7 +149,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[4] = 0xfb; frame[5] = 0xfd; - write(fd, frame, 6); + n = write(fd, frame, 6); break; case 0x07: @@ -163,7 +168,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[4] = 0xfb; frame[5] = 0xfd; - write(fd, frame, 6); + n = write(fd, frame, 6); break; case 0x0f: @@ -173,7 +178,7 @@ void frameParse(int fd, unsigned char *frame, int len) printf("set split %d\n", 1); frame[4] = 0xfb; frame[5] = 0xfd; - write(fd, frame, 6); + n = write(fd, frame, 6); break; #if 0 @@ -194,9 +199,9 @@ void frameParse(int fd, unsigned char *frame, int len) frame[5] = ant_curr; frame[6] = ant_option; frame[7] = 0xfd; - printf("n=write 8 bytes\n"); + printf("n=n = write 8 bytes\n"); dump_hex(frame, 8); - write(fd, frame, 8); + n = write(fd, frame, 8); break; #endif @@ -211,7 +216,7 @@ void frameParse(int fd, unsigned char *frame, int len) printf("Using AF level %d\n", level); to_bcd(&frame[6], (long long) level, 2); frame[8] = 0xfd; - write(fd, frame, 9); + n = write(fd, frame, 9); break; case 0x0a: @@ -222,7 +227,7 @@ void frameParse(int fd, unsigned char *frame, int len) to_bcd(&frame[6], (long long)power_level, 2); frame[8] = 0xfd; - write(fd, frame, 9); + n = write(fd, frame, 9); break; case 0x0c: @@ -234,14 +239,14 @@ void frameParse(int fd, unsigned char *frame, int len) printf("subcmd=0x0c #1\n"); keyspd = from_bcd(&frame[6], 2); frame[6] = 0xfb; - write(fd, frame, 7); + n = write(fd, frame, 7); } else { printf("subcmd=0x0c #1\n"); to_bcd(&frame[6], keyspd, 2); frame[8] = 0xfd; - write(fd, frame, 9); + n = write(fd, frame, 9); } break; @@ -263,7 +268,7 @@ void frameParse(int fd, unsigned char *frame, int len) to_bcd(&frame[6], (long long)meter_level, 2); frame[8] = 0xfd; - write(fd, frame, 9); + n = write(fd, frame, 9); break; } @@ -274,7 +279,7 @@ void frameParse(int fd, unsigned char *frame, int len) case 0x18: // miscellaneous things frame[5] = 1; frame[6] = 0xfd; - write(fd, frame, 7); + n = write(fd, frame, 7); break; #endif @@ -282,7 +287,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[6] = 0x61; frame[7] = 0x00; frame[8] = 0xfd; - write(fd, frame, 9); + n = write(fd, frame, 9); break; case 0x1a: // miscellaneous things @@ -293,7 +298,7 @@ void frameParse(int fd, unsigned char *frame, int len) else { frame[6] = widthB; } frame[7] = 0xfd; - write(fd, frame, 8); + n = write(fd, frame, 8); break; } @@ -307,14 +312,14 @@ void frameParse(int fd, unsigned char *frame, int len) { frame[6] = ptt; frame[7] = 0xfd; - write(fd, frame, 8); + n = write(fd, frame, 8); } else { ptt = frame[6]; frame[7] = 0xfb; frame[8] = 0xfd; - write(fd, frame, 9); + n = write(fd, frame, 9); } break; @@ -341,7 +346,7 @@ void frameParse(int fd, unsigned char *frame, int len) } frame[11] = 0xfd; - write(fd, frame, 12); + n = write(fd, frame, 12); } else { @@ -353,7 +358,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[4] = 0xfb; frame[5] = 0xfd; - write(fd, frame, 6); + n = write(fd, frame, 6); } break; @@ -369,7 +374,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[7] = frame[5] == 0 ? datamodeA : datamodeB; frame[8] = 0xfb; frame[9] = 0xfd; - write(fd, frame, 10); + n = write(fd, frame, 10); } else { @@ -388,7 +393,7 @@ void frameParse(int fd, unsigned char *frame, int len) frame[4] = 0xfb; frame[5] = 0xfd; - write(fd, frame, 6); + n = write(fd, frame, 6); } printf("\n"); @@ -410,6 +415,7 @@ void frameParse(int fd, unsigned char *frame, int len) } // don't care about the rig type yet + if (n == 0) printf("write failed?\n"); } commit 517a8918ab88fbd80ba45d87c0884e3d1ca67856 Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 18 15:56:24 2025 -0600 Update ax_python_devel.m4 to fix installation problems diff --git a/macros/ax_python_devel.m4 b/macros/ax_python_devel.m4 old mode 100644 new mode 100755 index 1df46a9cf..780584eae --- a/macros/ax_python_devel.m4 +++ b/macros/ax_python_devel.m4 @@ -67,7 +67,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 23 +#serial 32 AU_ALIAS([AC_PYTHON_DEVEL], [AX_PYTHON_DEVEL]) AC_DEFUN([AX_PYTHON_DEVEL],[ @@ -112,15 +112,39 @@ to something else than an empty string. fi # - # if the macro parameter ``version'' is set, honour it + # If the macro parameter ``version'' is set, honour it. + # A Python shim class, VPy, is used to implement correct version comparisons via + # string expressions, since e.g. a naive textual ">= 2.7.3" won't work for + # Python 2.7.10 (the ".1" being evaluated as less than ".3"). # if test -n "$1"; then AC_MSG_CHECKING([for a version of Python $1]) - ac_supports_python_ver=`$PYTHON -c "import sys; \ - ver = sys.version.split ()[[0]]; \ + cat << EOF > ax_python_devel_vpy.py +class VPy: + def vtup(self, s): + return tuple(map(int, s.strip().replace("rc", ".").split("."))) + def __init__(self): + import sys + self.vpy = tuple(sys.version_info) + def __eq__(self, s): + return self.vpy == self.vtup(s) + def __ne__(self, s): + return self.vpy != self.vtup(s) + def __lt__(self, s): + return self.vpy < self.vtup(s) + def __gt__(self, s): + return self.vpy > self.vtup(s) + def __le__(self, s): + return self.vpy <= self.vtup(s) + def __ge__(self, s): + return self.vpy >= self.vtup(s) +EOF + ac_supports_python_ver=`$PYTHON -c "import ax_python_devel_vpy; \ + ver = ax_python_devel_vpy.VPy(); \ print (ver $1)"` + rm -rf ax_python_devel_vpy*.py* __pycache__/ax_python_devel_vpy*.py* if test "$ac_supports_python_ver" = "True"; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([this package requires Python $1. @@ -208,7 +232,7 @@ EOD` ac_python_version=$PYTHON_VERSION else ac_python_version=`$PYTHON -c "import sys; \ - print (sys.version[[:3]])"` + print ("%d.%d" % sys.version_info[[:2]])"` fi fi @@ -251,7 +275,7 @@ EOD` ac_python_libdir=`$PYTHON -c \ "from sysconfig import get_python_lib as f; \ import os; \ - print ('Using old way' + os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"` + print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"` PYTHON_LIBS="-L$ac_python_libdir -lpython$ac_python_version" fi @@ -268,14 +292,24 @@ EOD` # # Check for site packages # - AC_MSG_CHECKING([for Python site-packages pathXX $PYTHON_SITE_PKG]) + AC_MSG_CHECKING([for Python site-packages path]) if test -z "$PYTHON_SITE_PKG"; then - AC_MSG_CHECKING([Using PYTHON_SITE_PKG]) if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then - PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \ - print (sysconfig.get_path('purelib'));"` + PYTHON_SITE_PKG=`$PYTHON -c " +$IMPORT_SYSCONFIG; +if hasattr(sysconfig, 'get_default_scheme'): + scheme = sysconfig.get_default_scheme() +else: + scheme = sysconfig._get_default_scheme() +if scheme == 'posix_local': + # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/ + scheme = 'posix_prefix' +prefix = '$prefix' +if prefix == 'NONE': + prefix = '$ac_default_prefix' +sitedir = sysconfig.get_path('purelib', scheme, vars={'base': prefix}) +print(sitedir)"` else - AC_MSG_CHECKING([Using old way]) # distutils.sysconfig way PYTHON_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \ print (sysconfig.get_python_lib(0,0));"` @@ -288,10 +322,22 @@ EOD` # Check for platform-specific site packages # AC_MSG_CHECKING([for Python platform specific site-packages path]) - if test -z "$PYTHON_SITE_PKG"; then + if test -z "$PYTHON_PLATFORM_SITE_PKG"; then if test "$IMPORT_SYSCONFIG" = "import sysconfig"; then - PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \ - print (sysconfig.get_path('platlib'));"` + PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c " +$IMPORT_SYSCONFIG; +if hasattr(sysconfig, 'get_default_scheme'): + scheme = sysconfig.get_default_scheme() +else: + scheme = sysconfig._get_default_scheme() +if scheme == 'posix_local': + # Debian's default scheme installs to /usr/local/ but we want to find headers in /usr/ + scheme = 'posix_prefix' +prefix = '$prefix' +if prefix == 'NONE': + prefix = '$ac_default_prefix' +sitedir = sysconfig.get_path('platlib', scheme, vars={'platbase': prefix}) +print(sitedir)"` else # distutils.sysconfig way PYTHON_PLATFORM_SITE_PKG=`$PYTHON -c "$IMPORT_SYSCONFIG; \ @@ -333,7 +379,7 @@ EOD` ac_save_LIBS="$LIBS" ac_save_LDFLAGS="$LDFLAGS" ac_save_CPPFLAGS="$CPPFLAGS" - LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LIBS" + LIBS="$ac_save_LIBS $PYTHON_LIBS $PYTHON_EXTRA_LIBS" LDFLAGS="$ac_save_LDFLAGS $PYTHON_EXTRA_LDFLAGS" CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" AC_LANG_PUSH([C]) @@ -349,7 +395,7 @@ EOD` AC_MSG_RESULT([$pythonexists]) - if test ! "x$pythonexists" = "xyes"; then + if test ! "x$pythonexists" = "xyes"; then AC_MSG_FAILURE([ Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, commit bedbfff8c4c574dad9bd14cc620d4c2683afe9ed Author: Michael Black W9MDB <mdb...@ya...> Date: Sat Jan 18 15:55:54 2025 -0600 Remove unnecessary include diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 06f0fd428..6db75e359 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -52,7 +52,7 @@ #else //#include <sys/socket.h> // doesn't seem we need this #include <netinet/in.h> -#include <arpa/inet.h> +//#include <arpa/inet.h> #endif // mingw64 still shows __TIMESIZE != 64 commit a985b50eea15f8f8c8f376888e639dbb7c05daaa Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 15 08:11:02 2025 -0600 Fix IC9100 rigctld startup where it was starting on VFOA and ending up on VFOB https://github.com/Hamlib/Hamlib/issues/1656 diff --git a/rigs/icom/ic9100.c b/rigs/icom/ic9100.c index eab9239e4..65c2a3dcd 100644 --- a/rigs/icom/ic9100.c +++ b/rigs/icom/ic9100.c @@ -111,12 +111,15 @@ static const struct icom_priv_caps ic9100_priv_caps = .data_mode_supported = 1 }; +// borrow this as they behave the same +extern int ic9700_set_vfo(RIG *rig, vfo_t vfo); + struct rig_caps ic9100_caps = { RIG_MODEL(RIG_MODEL_IC9100), .model_name = "IC-9100", .mfg_name = "Icom", - .version = BACKEND_VER ".5", + .version = BACKEND_VER ".6", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -250,8 +253,7 @@ struct rig_caps ic9100_caps = .get_mode = icom_get_mode, .set_mode = icom_set_mode, - - .set_vfo = icom_set_vfo, + .set_vfo = ic9700_set_vfo, // .get_vfo = icom_get_vfo, .set_ant = icom_set_ant, .get_ant = icom_get_ant, diff --git a/src/rig.c b/src/rig.c index 813513293..fce0b168a 100644 --- a/src/rig.c +++ b/src/rig.c @@ -1547,7 +1547,7 @@ int HAMLIB_API rig_open(RIG *rig) { vfo_t myvfo = RIG_VFO_A; - if (rig->caps->rig_model == RIG_MODEL_IC9700) { myvfo = RIG_VFO_MAIN_A; } + if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_A; } retval = rig_get_freq(rig, myvfo, &freq); @@ -1557,7 +1557,7 @@ int HAMLIB_API rig_open(RIG *rig) vfo_t tx_vfo = RIG_VFO_NONE; myvfo = RIG_VFO_B; - if (rig->caps->rig_model == RIG_MODEL_IC9700) { myvfo = RIG_VFO_MAIN_B; } + if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_B; } rig_get_freq(rig, myvfo, &freq); rig_get_split_vfo(rig, RIG_VFO_RX, &split, &tx_vfo); @@ -1570,7 +1570,7 @@ int HAMLIB_API rig_open(RIG *rig) { myvfo = RIG_VFO_A; - if (rig->caps->rig_model == RIG_MODEL_IC9700) { myvfo = RIG_VFO_MAIN_A; } + if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_A; } rig_get_mode(rig, myvfo, &mode, &width); @@ -1578,7 +1578,7 @@ int HAMLIB_API rig_open(RIG *rig) { myvfo = RIG_VFO_B; - if (rig->caps->rig_model == RIG_MODEL_IC9700) { myvfo = RIG_VFO_MAIN_A; } + if (rig->caps->rig_model == RIG_MODEL_IC9700 || rig->caps->rig_model == RIG_MODEL_IC9100) { myvfo = RIG_VFO_MAIN_A; } rig_debug(RIG_DEBUG_VERBOSE, "xxxsplit=%d\n", split); HAMLIB_TRACE; @@ -2373,6 +2373,7 @@ int rig_set_freq(RIG *rig, vfo_t vfo, freq_t freq) rig_set_cache_freq(rig, vfo, freq_new); + rig_debug(RIG_DEBUG_ERR, "%s: vfo=%s, save=%s\n", __func__, rig_strvfo(vfo), rig_strvfo(vfo_save)); if (vfo != vfo_save && vfo != RIG_VFO_CURR) { HAMLIB_TRACE; @@ -2539,8 +2540,9 @@ int HAMLIB_API rig_get_freq(RIG *rig, vfo_t vfo, freq_t *freq) // WSJT-X senses rig precision with 55 and 56 Hz values // We do not want to allow cache response with these values int wsjtx_special = ((long) * freq % 100) == 55 || ((long) * freq % 100) == 56; + int rig_special = rig->caps->rig_model == RIG_MODEL_IC9100; - if (!wsjtx_special && *freq != 0 && (cache_ms_freq < cachep->timeout_ms + if (!rig_special && !wsjtx_special && *freq != 0 && (cache_ms_freq < cachep->timeout_ms || (cachep->timeout_ms == HAMLIB_CACHE_ALWAYS || rs->use_cached_freq))) { commit 24d67437b78aeb9d0c7925450bda9839ebd7c31a Author: Michael Black W9MDB <mdb...@ya...> Date: Sun Jan 12 12:43:39 2025 -0600 Remove include of sys/socket.h from rig.h -- doesn't seem we need it and breaks grig build https://github.com/Hamlib/Hamlib/issues/1655 diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 879c31c3d..06f0fd428 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -50,7 +50,7 @@ #include <windows.h> #include <ws2tcpip.h> #else -#include <sys/socket.h> +//#include <sys/socket.h> // doesn't seem we need this #include <netinet/in.h> #include <arpa/inet.h> #endif commit 46143578ae3853db6054e73be5867bd69cadff29 Author: Michael Black W9MDB <mdb...@ya...> Date: Wed Jan 8 06:33:42 2025 -0600 Remove QMX from QDX entry diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 5a466a36a..4cb0eb789 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -1740,9 +1740,9 @@ struct rig_caps trudx_caps = struct rig_caps qrplabs_caps = { RIG_MODEL(RIG_MODEL_QRPLABS), - .model_name = "QCX/QDX/QMX", + .model_name = "QCX/QDX", .mfg_name = "QRPLabs", - .version = BACKEND_VER ".3", + .version = BACKEND_VER ".4", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, commit 8636901bf3a74a6a5af5c89df12393adcc0ae3f6 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 7 16:56:52 2025 -0600 Fix IC746 and IC746PRO set mode to not use data byte diff --git a/rigs/icom/icom.c b/rigs/icom/icom.c index 5fd927b17..cd05edcdb 100644 --- a/rigs/icom/icom.c +++ b/rigs/icom/icom.c @@ -2289,6 +2289,8 @@ static int icom_set_mode_without_data(RIG *rig, vfo_t vfo, rmode_t mode, || RIG_IS_IC375 || RIG_IS_IC726 || RIG_IS_IC475 + || RIG_IS_IC746 + || RIG_IS_IC746PRO || RIG_IS_IC756 || RIG_IS_IC756PROII || RIG_IS_IC756PROIII diff --git a/rigs/icom/icom.h b/rigs/icom/icom.h index c78c64e55..47d99d91d 100644 --- a/rigs/icom/icom.h +++ b/rigs/icom/icom.h @@ -35,7 +35,7 @@ #include <sys/time.h> #endif -#define BACKEND_VER "20241203" +#define BACKEND_VER "20250107" #define ICOM_IS_ID31 rig_is_model(rig, RIG_MODEL_ID31) #define ICOM_IS_ID51 rig_is_model(rig, RIG_MODEL_ID51) commit 33adef942e4e3227be56d0b9a2f5a3b5b7b43010 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 7 09:03:34 2025 -0600 Seperate QMX from QDX due to incompatible modes in FLRig https://github.com/Hamlib/Hamlib/issues/1653 diff --git a/include/hamlib/riglist.h b/include/hamlib/riglist.h index 7b1579e23..768c40691 100644 --- a/include/hamlib/riglist.h +++ b/include/hamlib/riglist.h @@ -208,6 +208,7 @@ #define RIG_MODEL_THETIS RIG_MAKE_MODEL(RIG_KENWOOD, 54) #define RIG_MODEL_TRUSDX RIG_MAKE_MODEL(RIG_KENWOOD, 55) #define RIG_MODEL_SDRCONSOLE RIG_MAKE_MODEL(RIG_KENWOOD, 56) +#define RIG_MODEL_QRPLABS_QMX RIG_MAKE_MODEL(RIG_KENWOOD,57) /* * Icom diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index fc6d2f2d8..d2e444a45 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -6532,6 +6532,7 @@ DECLARE_INITRIG_BACKEND(kenwood) rig_register(&tx500_caps); rig_register(&sdruno_caps); rig_register(&qrplabs_caps); + rig_register(&qrplabs_qmx_caps); rig_register(&fx4_caps); rig_register(&thetis_caps); rig_register(&trudx_caps); diff --git a/rigs/kenwood/kenwood.h b/rigs/kenwood/kenwood.h index 4fbd214bb..f1b2d0e07 100644 --- a/rigs/kenwood/kenwood.h +++ b/rigs/kenwood/kenwood.h @@ -334,6 +334,7 @@ extern struct rig_caps malachite_caps; extern struct rig_caps tx500_caps; extern struct rig_caps sdruno_caps; extern struct rig_caps qrplabs_caps; +extern struct rig_caps qrplabs_qmx_caps; extern struct rig_caps fx4_caps; extern struct rig_caps thetis_caps; extern struct rig_caps trudx_caps; diff --git a/rigs/kenwood/ts480.c b/rigs/kenwood/ts480.c index 66fe2f130..5a466a36a 100644 --- a/rigs/kenwood/ts480.c +++ b/rigs/kenwood/ts480.c @@ -36,6 +36,7 @@ #define TS480_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_RTTYR) #define SDRUNO_ALL_MODES (RIG_MODE_AM|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_RTTYR|RIG_MODE_PKTUSB) #define PS8000A_ALL_MODES (RIG_MODE_AM|RIG_MODE_AMS|RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY|RIG_MODE_RTTYR) +#define QMX_ALL_MODES (RIG_MODE_CW|RIG_MODE_CWR|RIG_MODE_PKTUSB|RIG_MODE_PKTLSB) #define TS480_OTHER_TX_MODES (RIG_MODE_CW|RIG_MODE_SSB|RIG_MODE_FM|RIG_MODE_RTTY) #define TS480_AM_TX_MODES RIG_MODE_AM @@ -1937,6 +1938,67 @@ struct rig_caps qrplabs_caps = .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS }; +struct rig_caps qrplabs_qmx_caps = +{ + RIG_MODEL(RIG_MODEL_QRPLABS_QMX), + .model_name = "QMX", + .mfg_name = "QRPLabs", + .version = BACKEND_VER ".1", + .copyright = "LGPL", + .status = RIG_STATUS_BETA, + .rig_type = RIG_TYPE_TRANSCEIVER, + .ptt_type = RIG_PTT_RIG, + .dcd_type = RIG_DCD_RIG, + .port_type = RIG_PORT_SERIAL, + .serial_rate_min = 9600, + .serial_rate_max = 256000, + .serial_data_bits = 8, + .serial_stop_bits = 1, + .serial_parity = RIG_PARITY_NONE, + .serial_handshake = RIG_HANDSHAKE_NONE, + .write_delay = 0, + .post_write_delay = 0, + .timeout = 500, + .retry = 3, + .preamp = {12, RIG_DBLST_END,}, + .attenuator = {12, RIG_DBLST_END,}, + .targetable_vfo = RIG_TARGETABLE_FREQ, + .transceive = RIG_TRN_RIG, + + .rx_range_list1 = { + {MHz(4), MHz(14), QMX_ALL_MODES, -1, -1, TS480_VFO}, + RIG_FRNG_END, + }, /*!< Receive frequency range list for ITU region 1 */ + .tx_range_list1 = { + {MHz(4), MHz(14), QMX_ALL_MODES, 5000, 100000, TS480_VFO}, + RIG_FRNG_END, + }, /*!< Transmit frequency range list for ITU region 1 */ + /* mode/filter list, remember: order matters! */ + .filters = { + {RIG_MODE_SSB | RIG_MODE_PKTUSB | RIG_MODE_PKTLSB, kHz(3.2)}, + {RIG_MODE_CW | RIG_MODE_CWR, Hz(300)}, + RIG_FLT_END, + }, + + .rig_init = ts480_init, + .rig_open = qrplabs_open, + .rig_cleanup = kenwood_cleanup, + .set_freq = kenwood_set_freq, + .get_freq = kenwood_get_freq, + .set_mode = kenwood_set_mode, + .get_mode = kenwood_get_mode, + .set_vfo = kenwood_set_vfo, + .get_vfo = kenwood_get_vfo_if, + .set_split_vfo = kenwood_set_split_vfo, + .get_split_vfo = kenwood_get_split_vfo_if, + .get_ptt = kenwood_get_ptt, + .set_ptt = kenwood_set_ptt, + .get_info = kenwood_ts480_get_info, + .get_clock = qrplabs_get_clock, + .set_clock = qrplabs_set_clock, + .hamlib_check_rig_caps = HAMLIB_CHECK_RIG_CAPS +}; + /* * Hilberling PT8000A TS480 emulation * Notice that some rigs share the same functions. commit d2065fe781b1213c1458565eb4fe40227bb657f3 Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 7 07:54:00 2025 -0600 Add DIGI-U and DIGI-L to possible modes from FLRig https://github.com/Hamlib/Hamlib/issues/1653 diff --git a/rigs/dummy/flrig.c b/rigs/dummy/flrig.c index b56f87453..f6a3620d8 100644 --- a/rigs/dummy/flrig.c +++ b/rigs/dummy/flrig.c @@ -143,7 +143,7 @@ struct rig_caps flrig_caps = RIG_MODEL(RIG_MODEL_FLRIG), .model_name = "", .mfg_name = "FLRig", - .version = "20241204.0", + .version = "20250107.0", .copyright = "LGPL", .status = RIG_STATUS_STABLE, .rig_type = RIG_TYPE_TRANSCEIVER, @@ -1056,7 +1056,9 @@ static int flrig_open(RIG *rig) else if (streq(p, "DIG")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DIGI")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DIGL")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } + else if (streq(p, "DIGI-L")) { modeMapAdd(&modes, RIG_MODE_PKTLSB, p); } else if (streq(p, "DIGU")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } + else if (streq(p, "DIGI-U")) { modeMapAdd(&modes, RIG_MODE_PKTUSB, p); } else if (streq(p, "DSB")) { modeMapAdd(&modes, RIG_MODE_DSB, p); } else if (streq(p, "FM")) { modeMapAdd(&modes, RIG_MODE_FM, p); } else if (streq(p, "FM-D")) { modeMapAdd(&modes, RIG_MODE_PKTFM, p); } commit d1e0e3f204d3b0f5b3a17e83a50d360184136e0d Author: Michael Black W9MDB <mdb...@ya...> Date: Tue Jan 7 07:52:08 2025 -0600 Let kenwood serial read remove non-printable chars from responses Should help it be a bit more robust against bad serial data like this https://github.com/Hamlib/Hamlib/issues/1652 diff --git a/rigs/kenwood/kenwood.c b/rigs/kenwood/kenwood.c index 3cca97103..fc6d2f2d8 100644 --- a/rigs/kenwood/kenwood.c +++ b/rigs/kenwood/kenwood.c @@ -231,6 +231,23 @@ struct confparams kenwood_cfg_params[] = { RIG_CONF_END, NULL, } }; +int remove_nonprint(char *s) +{ + int i, j = 0; + if (s == NULL) return 0; + + for (i = 0; s[i] != '\0'; ++i) + { + if (isprint((unsigned char)s[i])) + { + s[j++] = s[i]; // Copy printable character + } + } + s[j] = '\0'; // Null-terminate the string + + return j; // Return the new length of the string +} + /** * kenwood_transaction @@ -424,6 +441,10 @@ transaction_read: rig_debug(RIG_DEBUG_TRACE, "%s: read_string len=%d '%s'\n", __func__, (int)strlen(buffer), buffer); + // this fixes the case when some corrupt... [truncated message content] |