Hello community,

here is the log from the commit of package soapy-sdr for openSUSE:Factory 
checked in at 2019-01-28 20:50:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/soapy-sdr (Old)
 and      /work/SRC/openSUSE:Factory/.soapy-sdr.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "soapy-sdr"

Mon Jan 28 20:50:26 2019 rev:6 rq:669118 version:0.7.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/soapy-sdr/soapy-sdr.changes      2018-11-12 
09:45:03.484861185 +0100
+++ /work/SRC/openSUSE:Factory/.soapy-sdr.new.28833/soapy-sdr.changes   
2019-01-28 20:50:53.301750564 +0100
@@ -1,0 +2,10 @@
+Sun Jan 27 16:52:42 UTC 2019 - [email protected]
+
+- Update to version 0.7.1
+  * Fix for C API call SoapySDRDevice_setIQBalance()
+  * Default logger can be restored by setting NULL handler
+    + Bumped API version to 0.7.1 for the NULL log handler option
+  * Add missing registerLogHandler() to python bindings
+  * Move visibility flags from project config to library scope
+
+-------------------------------------------------------------------

Old:
----
  soapy-sdr-0.7.0.tar.gz

New:
----
  soapy-sdr-0.7.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ soapy-sdr.spec ++++++
--- /var/tmp/diff_new_pack.lM8R8v/_old  2019-01-28 20:50:53.801750036 +0100
+++ /var/tmp/diff_new_pack.lM8R8v/_new  2019-01-28 20:50:53.801750036 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package soapy-sdr
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2017, Martin Hauke <[email protected]>
 #
 # All modifications and additions to the file contributed by third parties
@@ -19,7 +19,7 @@
 
 %define sover 0_7
 Name:           soapy-sdr
-Version:        0.7.0
+Version:        0.7.1
 Release:        0
 Summary:        Vendor and platform neutral SDR support library
 License:        BSL-1.0

++++++ soapy-sdr-0.7.0.tar.gz -> soapy-sdr-0.7.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/Changelog.txt 
new/SoapySDR-soapy-sdr-0.7.1/Changelog.txt
--- old/SoapySDR-soapy-sdr-0.7.0/Changelog.txt  2018-10-25 05:38:55.000000000 
+0200
+++ new/SoapySDR-soapy-sdr-0.7.1/Changelog.txt  2019-01-26 19:14:47.000000000 
+0100
@@ -1,5 +1,14 @@
 This this the changelog file for the SoapySDR project.
 
+Release 0.7.1 (2019-01-26)
+==========================
+
+- Fix for C API call SoapySDRDevice_setIQBalance()
+- Default logger can be restored by setting NULL handler
+  - Bumped API version to 0.7.1 for the NULL log handler option
+- Add missing registerLogHandler() to python bindings
+- Move visibility flags from project config to library scope
+
 Release 0.7.0 (2018-10-24)
 ==========================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/SoapySDR-soapy-sdr-0.7.0/cmake/Modules/SoapySDRConfig.cmake 
new/SoapySDR-soapy-sdr-0.7.1/cmake/Modules/SoapySDRConfig.cmake
--- old/SoapySDR-soapy-sdr-0.7.0/cmake/Modules/SoapySDRConfig.cmake     
2018-10-25 05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/cmake/Modules/SoapySDRConfig.cmake     
2019-01-26 19:14:47.000000000 +0100
@@ -81,10 +81,6 @@
     #common warnings to help encourage good coding practices
     add_compile_options(-Wall)
     add_compile_options(-Wextra)
-
-    #symbols are only exported from libraries/modules explicitly
-    add_compile_options(-fvisibility=hidden)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden")
 endif()
 
 if(APPLE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/debian/changelog 
new/SoapySDR-soapy-sdr-0.7.1/debian/changelog
--- old/SoapySDR-soapy-sdr-0.7.0/debian/changelog       2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/debian/changelog       2019-01-26 
19:14:47.000000000 +0100
@@ -1,3 +1,9 @@
+soapysdr (0.7.1-1) unstable; urgency=low
+
+  * Release 0.7.1 (2019-01-26)
+
+ -- Josh Blum <[email protected]>  Sat, 26 Jan 2019 12:14:39 -0000
+
 soapysdr (0.7.0-1) unstable; urgency=low
 
   * Release 0.7.0 (2018-10-24)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/debian/control 
new/SoapySDR-soapy-sdr-0.7.1/debian/control
--- old/SoapySDR-soapy-sdr-0.7.0/debian/control 2018-10-25 05:38:55.000000000 
+0200
+++ new/SoapySDR-soapy-sdr-0.7.1/debian/control 2019-01-26 19:14:47.000000000 
+0100
@@ -94,6 +94,7 @@
 Architecture: all
 Depends:
     soapysdr-module-airspy,
+    soapysdr-module-airspyhf,
     soapysdr-module-bladerf,
     soapysdr-module-hackrf,
     soapysdr-module-redpitaya,
@@ -102,7 +103,11 @@
     soapysdr-module-rfspace,
     soapysdr-module-osmosdr,
     soapysdr-module-mirisdr,
+    soapysdr-module-iris,
+    soapysdr-module-lms7,
     soapysdr-module-uhd,
+    soapysdr-module-plutosdr,
+    soapysdr-module-fcdpp,
     ${misc:Depends}
 Description: software defined radio hardware support modules
  SoapySDR is a library providing a common interface to SDR (software
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/debian/copyright 
new/SoapySDR-soapy-sdr-0.7.1/debian/copyright
--- old/SoapySDR-soapy-sdr-0.7.0/debian/copyright       2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/debian/copyright       2019-01-26 
19:14:47.000000000 +0100
@@ -4,7 +4,7 @@
 
 Files: *
 Copyright:
-    Copyright (c) 2014-2018 Josh Blum <[email protected]>
+    Copyright (c) 2014-2019 Josh Blum <[email protected]>
     Copyright (c) 2016-2016 Bastille Networks
 License: BSL-1.0
  Boost Software License - Version 1.0 - August 17th, 2003
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/include/SoapySDR/Logger.h 
new/SoapySDR-soapy-sdr-0.7.1/include/SoapySDR/Logger.h
--- old/SoapySDR-soapy-sdr-0.7.0/include/SoapySDR/Logger.h      2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/include/SoapySDR/Logger.h      2019-01-26 
19:14:47.000000000 +0100
@@ -82,6 +82,7 @@
 /*!
  * Register a new system log handler.
  * Platforms should call this to replace the default stdio handler.
+ * Passing `NULL` restores the default.
  */
 SOAPY_SDR_API void SoapySDR_registerLogHandler(const SoapySDRLogHandler 
handler);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/include/SoapySDR/Logger.hpp 
new/SoapySDR-soapy-sdr-0.7.1/include/SoapySDR/Logger.hpp
--- old/SoapySDR-soapy-sdr-0.7.0/include/SoapySDR/Logger.hpp    2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/include/SoapySDR/Logger.hpp    2019-01-26 
19:14:47.000000000 +0100
@@ -56,6 +56,7 @@
 /*!
  * Register a new system log handler.
  * Platforms should call this to replace the default stdio handler.
+ * Passing `nullptr` restores the default.
  */
 SOAPY_SDR_API void registerLogHandler(const LogHandler &handler);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/include/SoapySDR/Version.h 
new/SoapySDR-soapy-sdr-0.7.1/include/SoapySDR/Version.h
--- old/SoapySDR-soapy-sdr-0.7.0/include/SoapySDR/Version.h     2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/include/SoapySDR/Version.h     2019-01-26 
19:14:47.000000000 +0100
@@ -26,7 +26,7 @@
  * #endif
  * \endcode
  */
-#define SOAPY_SDR_API_VERSION 0x00070000
+#define SOAPY_SDR_API_VERSION 0x00070001
 
 /*!
  * ABI Version Information - incremented when the ABI is changed.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/lib/CMakeLists.txt 
new/SoapySDR-soapy-sdr-0.7.1/lib/CMakeLists.txt
--- old/SoapySDR-soapy-sdr-0.7.0/lib/CMakeLists.txt     2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/lib/CMakeLists.txt     2019-01-26 
19:14:47.000000000 +0100
@@ -38,10 +38,14 @@
     message(FATAL_ERROR "not win32 or unix")
 endif()
 
-#support threaded client code
-#notice that -pthread is not the same as -lpthread
 if(CMAKE_COMPILER_IS_GNUCXX)
+    #support threaded client code
+    #notice that -pthread is not the same as -lpthread
     list(APPEND SOAPY_SDR_LIBRARIES -pthread)
+
+    #symbols are only exported from libraries/modules explicitly
+    add_compile_options(-fvisibility=hidden)
+    add_compile_options(-fvisibility-inlines-hidden)
 endif()
 
 include_directories(${PROJECT_SOURCE_DIR}/include)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/lib/DeviceC.cpp 
new/SoapySDR-soapy-sdr-0.7.1/lib/DeviceC.cpp
--- old/SoapySDR-soapy-sdr-0.7.0/lib/DeviceC.cpp        2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/lib/DeviceC.cpp        2019-01-26 
19:14:47.000000000 +0100
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2018 Josh Blum
+// Copyright (c) 2014-2019 Josh Blum
 // Copyright (c) 2016-2016 Bastille Networks
 // SPDX-License-Identifier: BSL-1.0
 
@@ -364,7 +364,7 @@
 int SoapySDRDevice_setIQBalance(SoapySDRDevice *device, const int direction, 
const size_t channel, const double balanceI, const double balanceQ)
 {
     __SOAPY_SDR_C_TRY
-    device->setDCOffset(direction, channel, std::complex<double>(balanceI, 
balanceQ));
+    device->setIQBalance(direction, channel, std::complex<double>(balanceI, 
balanceQ));
     __SOAPY_SDR_C_CATCH
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/lib/LoggerC.cpp 
new/SoapySDR-soapy-sdr-0.7.1/lib/LoggerC.cpp
--- old/SoapySDR-soapy-sdr-0.7.0/lib/LoggerC.cpp        2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/lib/LoggerC.cpp        2019-01-26 
19:14:47.000000000 +0100
@@ -65,7 +65,7 @@
 /***********************************************************************
  * Default log message handler implementation
  **********************************************************************/
-void defaultLogHandler(const SoapySDRLogLevel logLevel, const char *message)
+static void defaultLogHandler(const SoapySDRLogLevel logLevel, const char 
*message)
 {
     switch (logLevel)
     {
@@ -103,9 +103,17 @@
     }
 }
 
+/***********************************************************************
+ * Replace the current registeredLogHandler with handler.
+ * If nullptr is passed then the default log handler is restored.
+ **********************************************************************/
 void SoapySDR_registerLogHandler(const SoapySDRLogHandler handler)
 {
-    registeredLogHandler = handler;
+    if (handler) {
+        registeredLogHandler = handler;
+    } else {
+        registeredLogHandler = defaultLogHandler;
+    }
 }
 
 void SoapySDR_setLogLevel(const SoapySDRLogLevel logLevel)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/SoapySDR-soapy-sdr-0.7.0/python/SoapySDR.i 
new/SoapySDR-soapy-sdr-0.7.1/python/SoapySDR.i
--- old/SoapySDR-soapy-sdr-0.7.0/python/SoapySDR.i      2018-10-25 
05:38:55.000000000 +0200
+++ new/SoapySDR-soapy-sdr-0.7.1/python/SoapySDR.i      2019-01-26 
19:14:47.000000000 +0100
@@ -2,7 +2,20 @@
 // Copyright (c) 2016-2016 Bastille Networks
 // SPDX-License-Identifier: BSL-1.0
 
-%module SoapySDR
+%define DOCSTRING
+"SoapySDR API.
+
+SoapySDR is an open-source generalized API and runtime library for interfacing
+with Software Defined Radio devices. With SoapySDR, you can instantiate,
+configure, and stream with an SDR device in a variety of environments.
+Refer to https://github.com/pothosware/SoapySDR/wiki
+
+This Python interface closely maps to the C/C++ one.
+See https://pothosware.github.io/SoapySDR/doxygen/latest/index.html for 
details.
+"
+%enddef
+
+%module(directors="1", docstring=DOCSTRING) SoapySDR
 
 ////////////////////////////////////////////////////////////////////////
 // Include all major headers to compile against
@@ -22,9 +35,14 @@
 ////////////////////////////////////////////////////////////////////////
 %include <exception.i>
 
+// We only expect to throw DirectorExceptions from within
+// SoapySDR_pythonLogHandlerBase calls.  Catching them permits us to
+// propagate exceptions thrown in the Python log handler callback back to
+// Python.
 %exception
 {
     try{$action}
+    catch (const Swig::DirectorException &e) { SWIG_fail; }
     catch (const std::exception &ex)
     {SWIG_exception(SWIG_RuntimeError, ex.what());}
     catch (...)
@@ -117,10 +135,89 @@
 %include <SoapySDR/Version.h>
 %include <SoapySDR/Formats.h>
 
+////////////////////////////////////////////////////////////////////////
+// Logging tie-ins for python
+////////////////////////////////////////////////////////////////////////
 %ignore SoapySDR_logf;
 %ignore SoapySDR_vlogf;
 %ignore SoapySDR_registerLogHandler;
+%ignore SoapySDR::logf;
+%ignore SoapySDR::vlogf;
+%ignore SoapySDR::registerLogHandler;
 %include <SoapySDR/Logger.h>
+%include <SoapySDR/Logger.hpp>
+
+%feature("director:except") {
+    if ($error != NULL) {
+        throw Swig::DirectorMethodException();
+    }
+}
+
+
+%feature("director") _SoapySDR_pythonLogHandlerBase;
+
+%inline %{
+    class _SoapySDR_pythonLogHandlerBase
+    {
+    public:
+        _SoapySDR_pythonLogHandlerBase(void)
+        {
+            globalHandle = this;
+            SoapySDR::registerLogHandler(&globalHandler);
+        }
+        virtual ~_SoapySDR_pythonLogHandlerBase(void)
+        {
+            globalHandle = nullptr;
+            // Restore the default, C coded, log handler.
+            SoapySDR::registerLogHandler(nullptr);
+        }
+        virtual void handle(const SoapySDR::LogLevel, const char *) = 0;
+
+    private:
+        static void globalHandler(const SoapySDR::LogLevel logLevel, const 
char *message)
+        {
+            if (globalHandle != nullptr) globalHandle->handle(logLevel, 
message);
+        }
+
+        static _SoapySDR_pythonLogHandlerBase *globalHandle;
+    };
+%}
+
+%{
+    _SoapySDR_pythonLogHandlerBase 
*_SoapySDR_pythonLogHandlerBase::globalHandle = nullptr;
+%}
+
+%insert("python")
+%{
+_SoapySDR_globalLogHandlers = [None]
+
+class _SoapySDR_pythonLogHandler(_SoapySDR_pythonLogHandlerBase):
+    def __init__(self, handler):
+        self.handler = handler
+        getattr(_SoapySDR_pythonLogHandlerBase, '__init__')(self)
+
+    def handle(self, *args): self.handler(*args)
+
+def registerLogHandler(handler):
+    """Register a new system log handler.
+
+    Platforms should call this to replace the default stdio handler.
+
+    :param handler: is a callback function that's called each time an event is
+    to be logged by the SoapySDR module.  It is passed the log level and the
+    the log message.  The callback shouldn't return anything, but may throw
+    exceptions which can be handled in turn in the Python client code.
+    Alternately, setting handler to None restores the default.
+
+    :type handler: Callable[[int, str], None] or None
+
+    :returns: None
+    """
+    if handler is None:
+        _SoapySDR_globalLogHandlers[0] = None
+    else:
+        _SoapySDR_globalLogHandlers[0] = _SoapySDR_pythonLogHandler(handler)
+%}
 
 ////////////////////////////////////////////////////////////////////////
 // Utility functions


Reply via email to