Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-radexreader for 
openSUSE:Factory checked in at 2025-08-09 19:59:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-radexreader (Old)
 and      /work/SRC/openSUSE:Factory/.python-radexreader.new.1085 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-radexreader"

Sat Aug  9 19:59:33 2025 rev:10 rq:1298454 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-radexreader/python-radexreader.changes    
2025-05-09 18:53:07.389483944 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-radexreader.new.1085/python-radexreader.changes
  2025-08-09 20:05:58.993689089 +0200
@@ -1,0 +2,9 @@
+Fri Aug  8 20:00:00 UTC 2025 - Fabrice Creuzot <c...@luigifab.fr>
+
+- New upstream release (1.3.0)
+  * add bash autocomplete script
+  * updated udev rule for Radex ONE (usb serial)
+  * fix some "possible" crash when the returned report
+    is shorter than expected
+
+-------------------------------------------------------------------

Old:
----
  python-radexreader-1.2.5.tar.gz

New:
----
  python-radexreader-1.3.0.tar.gz

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

Other differences:
------------------
++++++ python-radexreader.spec ++++++
--- /var/tmp/diff_new_pack.bWo4XL/_old  2025-08-09 20:05:59.637715855 +0200
+++ /var/tmp/diff_new_pack.bWo4XL/_new  2025-08-09 20:05:59.641716022 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-radexreader
-Version:        1.2.5
+Version:        1.3.0
 Release:        0
 Summary:        Reader for the RADEX RD1212 and ONE Geiger counters
 License:        GPL-2.0-or-later
@@ -59,9 +59,11 @@
 %pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 install -Dpm 755 radexreader-cli.py %{buildroot}%{_bindir}/radexreader
+install -Dpm 644 ../data/radexreader.bash 
%{buildroot}%{_datadir}/bash-completion/completions/radexreader
 install -Dpm 644 ../data/radexreader.1 
%{buildroot}%{_mandir}/man1/radexreader.1
 install -Dpm 644 ../data/radexreader.fr.1 
%{buildroot}%{_mandir}/fr/man1/radexreader.1
 %python_clone -a %{buildroot}%{_bindir}/radexreader
+%python_clone -a 
%{buildroot}%{_datadir}/bash-completion/completions/radexreader
 %python_clone -a %{buildroot}%{_mandir}/man1/radexreader.1
 %python_clone -a %{buildroot}%{_mandir}/fr/man1/radexreader.1
 %python_expand install -Dpm 644 ../scripts/debian/python3-radexreader.udev 
%{buildroot}%{_udevrulesdir}/60-python%{$python_bin_suffix}-radexreader.rules
@@ -72,6 +74,7 @@
 %{python_sitelib}/radexreader
 %{python_sitelib}/radexreader-%{version}.dist-info
 %python_alternative %{_bindir}/radexreader
+%python_alternative %{_datadir}/bash-completion/completions/radexreader
 %python_alternative %{_mandir}/man1/radexreader.1%{?ext_man}
 %python_alternative %{_mandir}/fr/man1/radexreader.1%{?ext_man}
 %{_udevrulesdir}/60-python%{python_bin_suffix}-radexreader.rules

++++++ python-radexreader-1.2.5.tar.gz -> python-radexreader-1.3.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/README.md 
new/python-radexreader-1.3.0/README.md
--- old/python-radexreader-1.2.5/README.md      2025-03-03 21:00:00.000000000 
+0100
+++ new/python-radexreader-1.3.0/README.md      2025-08-08 22:00:00.000000000 
+0200
@@ -36,26 +36,38 @@
 
 * `sudo urpmi python3-radexreader`
 
-#### Installation with PIP
+#### Installation for OpenMandriva
 
-* With Linux: `sudo python3 -m pip install radexreader` (+libusb)
-* With Mac: `sudo pip install radexreader` (+libusb)
-* With Windows: `python -m pip install radexreader` 
(+[libusb](https://libusb.info/), put libusb-1.0.dll in system32)
+* `sudo dnf install python-radexreader`
 
 #### Installation with Docker
 
-* `sudo docker run --rm --user root -it --privileged -v /dev:/dev 
python:3.x-alpine /bin/sh` then: `apk update ; apk add libusb ; python3 -m pip 
install radexreader`
+* `sudo docker run --rm --user root -it --privileged -v /dev:/dev 
python:3.13-alpine /bin/sh` then: `apk update ; apk add libusb ; python3 -m pip 
install radexreader`
+
+If the **Radex ONE** doesn't work, read this 
[comment](https://github.com/luigifab/python-radexreader/issues/14#issuecomment-2742564354)
 (`modprobe & echo`).
+
+#### Installation with PIP or Manual installation
+
+* Linux: `sudo python3 -m pip install radexreader` (**+** libusb)
+* Mac: `sudo pip install radexreader` (**+** libusb)
+* Windows: `python -m pip install radexreader` (**+** 
[libusb](https://libusb.info/), put libusb-1.0.dll in system32)
+* Manual: `git clone` or download archive (**+** libusb)
+
+Please note that **you must authorise** the usage of your device **without 
root privileges**. To do that, install 
[python3-radexreader.udev](https://github.com/luigifab/python-radexreader/blob/master/scripts/debian/python3-radexreader.udev)
 in `/usr/lib/udev/rules.d/60-python3-radexreader.rules` or 
`/lib/udev/rules.d/60-python3-radexreader.rules`.
+
+If you can't/won't, if the **Radex ONE** doesn't work, read this 
[comment](https://github.com/luigifab/python-radexreader/issues/14#issuecomment-2742564354)
 (`modprobe & echo`).
 
 #### Alternative installation for Debian, Devuan, Ubuntu, Trisquel, Linux 
Mint, MX Linux
 
 ```bash
 # PPA: https://launchpad.net/~luigifab/+archive/ubuntu/packages
-# with Debian 12+ you can use mantic+ instead of focal 
(https://unix.stackexchange.com/a/669008/364800)
-# for Debian you can use bionic for buster, focal for bullseye, noble for 
bookworm and trixie
-# for Devuan you can use bionic for beowulf, focal for chimaera, noble for 
daedalus
+# with Debian 12+/Bookworm+ you can use mantic+ instead of focal 
(https://unix.stackexchange.com/a/669008/364800)
+# for Debian you can use focal for buster, jammy for bullseye, oracular or 
noble for bookworm, questing or plucky for trixie
+# for Devuan you can use focal for beowulf, jammy for chimaera, oracular or 
noble for daedalus, questing or plucky for excalibur and ceres
 # for Trisquel you can use focal for nabia, jammy for aramo
-# for Linux Mint you can use focal for 20.x and 5, jammy for 21.x, noble for 
22.x and 6
-# for MX Linux you can use focal for 19.x and 21.x, noble for 23.x
+# for Linux Mint you can use focal for 20.x and 4/debbie, jammy for 21.x and 
5/elsie, noble for 22.x and 6/faye, questing or plucky for 7/gigi
+# for MX Linux you can use focal for 19.x, jammy for 21.x, oracular or noble 
for 23.x
+# for Kali Linux you can use questing or plucky
 
 sudo add-apt-repository ppa:luigifab/packages
 sudo apt update
@@ -86,17 +98,9 @@
 
 ## Copyright
 
-- Current version: 1.2.5 (03/03/2025)
+- Current version: 1.3.0 (08/08/2025)
 - Compatibility: Python 3.3 / 3.4 / 3.5 / 3.6 / 3.7 / 3.8 / 3.9 / 3.10 / 3.11 
/ 3.12 / 3.13 / 3.14
-- Links: [luigifab.fr](https://www.luigifab.fr/python/radexreader) - 
[github.com](https://github.com/luigifab/python-radexreader) - 
[PyPI](https://pypi.org/project/radexreader/)\
-[Arch Linux 
python-radexreader.zst](https://aur.archlinux.org/packages/python-radexreader)\
-[Debian python-radexreader.deb, 
radexreader.deb](https://packages.debian.org/python3-radexreader)
-  *([ITP](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=973447),
-   [RFS](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=974217))*\
-[Fedora 
python-radexreader.rpm](https://src.fedoraproject.org/rpms/python-radexreader)\
-[openSUSE 
python-radexreader.rpm](https://software.opensuse.org/package/python-radexreader)\
-[Mageia 
python-radexreader.rpm](https://madb.mageia.org/package/show/name/python-radexreader/arch/x86_64)\
-[Ubuntu PPA](https://launchpad.net/~luigifab/+archive/ubuntu/packages)
+- Links: [luigifab.fr](https://www.luigifab.fr/python/radexreader) - 
[github.com](https://github.com/luigifab/python-radexreader) - 
[pypi.org](https://pypi.org/project/radexreader/) - 
[ppa/dpa](https://launchpad.net/~luigifab/+archive/ubuntu/packages)
 
 This program is provided under the terms of the **GNU GPLv2+** license.\
 If you like, take some of your time to improve some translations, go to 
https://bit.ly/2HyCCEc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/data/radexreader.bash 
new/python-radexreader-1.3.0/data/radexreader.bash
--- old/python-radexreader-1.2.5/data/radexreader.bash  1970-01-01 
01:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/data/radexreader.bash  2025-08-08 
22:00:00.000000000 +0200
@@ -0,0 +1,18 @@
+# Made in ChatGPT and Copilot
+# Licensed under the MIT License
+_radexreader_complete() {
+       local cur prev opts
+       COMPREPLY=()
+       cur="${COMP_WORDS[COMP_CWORD]}"
+       prev="${COMP_WORDS[COMP_CWORD-1]}"
+       opts="erase tail jsontail last jsonlast all jsonall"
+
+       case "$prev" in
+               erase|tail|jsontail|last|jsonlast|all|jsonall)
+                       return 1 # stop
+                       ;;
+       esac
+
+       COMPREPLY=( $(compgen -W "$opts" -- "$cur") )
+}
+complete -F _radexreader_complete radexreader
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/archlinux/PKGBUILD 
new/python-radexreader-1.3.0/scripts/archlinux/PKGBUILD
--- old/python-radexreader-1.2.5/scripts/archlinux/PKGBUILD     2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/archlinux/PKGBUILD     2025-08-08 
22:00:00.000000000 +0200
@@ -1,5 +1,5 @@
 pkgname=python-radexreader
-pkgver=1.2.5
+pkgver=1.3.0
 pkgrel=1
 pkgdesc="Reader for the RADEX RD1212 and ONE Geiger counters"
 arch=('any')
@@ -27,6 +27,7 @@
 
   install -Dpm 755 radexreader-cli.py "$pkgdir/usr/bin/radexreader"
 
+  install -Dpm 644 ../data/radexreader.bash 
"$pkgdir/usr/share/bash-completion/completions/$pkgname"
   install -Dpm 644 ../data/radexreader.1 
"$pkgdir/usr/share/man/man1/$pkgname.1"
   install -Dpm 644 ../data/radexreader.fr.1 
"$pkgdir/usr/share/man/fr/man1/$pkgname.1"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/changelog 
new/python-radexreader-1.3.0/scripts/debian/changelog
--- old/python-radexreader-1.2.5/scripts/debian/changelog       2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/changelog       2025-08-08 
22:00:00.000000000 +0200
@@ -1,5 +1,5 @@
-python-radexreader (1.2.5-1) experimental; urgency=low
+python-radexreader (1.3.0-1) experimental; urgency=low
 
   * Initial Debian package release (Closes: #973447)
 
- -- Fabrice Creuzot <c...@luigifab.fr>  Mon, 03 Mar 2025 20:00:00 +0000
+ -- Fabrice Creuzot <c...@luigifab.fr>  Fri, 08 Aug 2025 20:00:00 +0000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/changelog.mx 
new/python-radexreader-1.3.0/scripts/debian/changelog.mx
--- old/python-radexreader-1.2.5/scripts/debian/changelog.mx    2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/changelog.mx    2025-08-08 
22:00:00.000000000 +0200
@@ -1,5 +1,5 @@
-python-radexreader (1.2.5-1) mx; urgency=low
+python-radexreader (1.3.0-1) mx; urgency=low
 
   * Initial MX Linux package release
 
- -- Fabrice Creuzot <c...@luigifab.fr>  Mon, 03 Mar 2025 20:00:00 +0000
+ -- Fabrice Creuzot <c...@luigifab.fr>  Fri, 08 Aug 2025 20:00:00 +0000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/control 
new/python-radexreader-1.3.0/scripts/debian/control
--- old/python-radexreader-1.2.5/scripts/debian/control 2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/control 2025-08-08 
22:00:00.000000000 +0200
@@ -2,9 +2,9 @@
 Section: python
 Priority: optional
 Maintainer: Fabrice Creuzot <c...@luigifab.fr>
-Build-Depends: debhelper-compat (= 13), python3-all, dh-python, dh-exec
+Build-Depends: debhelper-compat (= 13), bash-completion, python3-all, 
dh-python, dh-exec
 Rules-Requires-Root: no
-Standards-Version: 4.6.2
+Standards-Version: 4.7.2
 Homepage: https://github.com/luigifab/python-radexreader
 Vcs-Browser: https://github.com/luigifab/python-radexreader
 Vcs-Git: https://github.com/luigifab/python-radexreader.git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/copyright 
new/python-radexreader-1.3.0/scripts/debian/copyright
--- old/python-radexreader-1.2.5/scripts/debian/copyright       2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/copyright       2025-08-08 
22:00:00.000000000 +0200
@@ -6,6 +6,11 @@
 Copyright: 2020-2025 Fabrice Creuzot (luigifab) <c...@luigifab.fr>
 License: GPL-2+
 
+Files: */fr.luigifab.*.metainfo.xml */radexreader.bash
+Copyright:
+ 2020-2025 Fabrice Creuzot (luigifab) <c...@luigifab.fr>
+License: Expat
+
 License: GPL-2+
  This package is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
@@ -22,3 +27,25 @@
  .
  On Debian systems, the complete text of the GNU General
  Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy 
of
+ this software and associated documentation files (the "Software"), to deal in
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of
+ the Software, and to permit persons to whom the Software is furnished to do 
so,
+ subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Comment:
+ This license also known as "MIT" or "MIT X11" however FSF consider
+ "MIT" labelling ambiguous and copyright-format specification recommend
+ to mark such license as "Expat".
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/deb.sh 
new/python-radexreader-1.3.0/scripts/debian/deb.sh
--- old/python-radexreader-1.2.5/scripts/debian/deb.sh  2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/deb.sh  2025-08-08 
22:00:00.000000000 +0200
@@ -3,7 +3,7 @@
 
 
 cd "$(dirname "$0")"
-version="1.2.5"
+version="1.3.0"
 
 
 mkdir builder
@@ -31,7 +31,7 @@
 
 
 # create packages for Debian and Ubuntu and MX Linux
-for serie in experimental plucky oracular noble jammy focal bionic xenial 
trusty mx23; do
+for serie in experimental questing plucky oracular noble jammy focal bionic 
xenial trusty mx23 mx21; do
 
        printf 
"\n\n#################################################################### 
$serie ##\n\n"
        if [ $serie = "experimental" ]; then
@@ -49,22 +49,24 @@
 
        dh_make -s -y -f ../python-radexreader-$version.tar.gz -p 
python-radexreader
 
-       rm -f debian/*/*ex debian/*ex debian/*EX debian/README* debian/*doc*
+       rm -rf debian/*/*ex debian/*ex debian/*EX debian/README* debian/*doc*
        cp scripts/debian/* debian/
        rm -f debian/deb.sh
-       mv debian/metadata debian/upstream/metadata
+       mkdir debian/upstream ; mv debian/metadata debian/upstream/metadata
        chmod +x debian/radexreader*install
 
 
        if [ $serie = "experimental" ]; then
                mv debian/control.debian debian/control
                mv debian/changelog.debian debian/changelog
+               rm -f debian/*.mx debian/*.debian debian/*.ubuntu
                echo "=========================== buildpackage ($serie) =="
                dpkg-buildpackage -us -uc
        else
                # debhelper: experimental:13 focal/mx19/mx21:12 bionic:9 
xenial:9 trusty:9
                if [ $serie = "unstable" ]; then
                        mv debian/control.debian debian/control
+
                elif [ $serie = "mx19" ] || [ $serie = "mx21" ]; then
                        mv debian/control.mx debian/control
                        sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 
12)/g' debian/control
@@ -73,18 +75,17 @@
                        sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 
12)/g' debian/control
                elif [ $serie = "bionic" ]; then
                        mv debian/control.ubuntu debian/control
-
+                       sed -i 
's/execute_before_dh_install:/override_dh_update_autotools_config:/g' 
debian/rules
                        sed -i 's/debhelper-compat (= 13)/debhelper-compat (= 
9)/g' debian/control
                elif [ $serie = "xenial" ]; then
                        mv debian/control.ubuntu debian/control
-
+                       sed -i 
's/execute_before_dh_install:/override_dh_update_autotools_config:/g' 
debian/rules
                        sed -i 's/debhelper-compat (= 13)/debhelper (>= 9)/g' 
debian/control
                        sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' 
debian/control
                        echo 9 > debian/compat
                elif [ $serie = "trusty" ]; then
                        mv debian/control.ubuntu debian/control
-
-
+                       sed -i 
's/execute_before_dh_install:/override_dh_update_autotools_config:/g' 
debian/rules
                        sed -i 's/debhelper-compat (= 13)/debhelper (>= 9)/g' 
debian/control
                        sed -i ':a;N;$!ba;s/Rules-Requires-Root: no\n//g' 
debian/control
                        echo 9 > debian/compat
@@ -101,25 +102,28 @@
                        sed -i 's/experimental/'$serie'/g' debian/changelog
                        sed -i 's/-1) /-1+'$serie') /' debian/changelog
                fi
-               rm -f debian/*.mx debian/*.debian
+               rm -f debian/*.mx debian/*.debian debian/*.ubuntu
                echo "=========================== buildpackage ($serie) =="
                dpkg-buildpackage -us -uc -ui -d -S
        fi
-       echo "=========================== debsign ($serie) =="
        cd ..
 
        if [ $serie = "experimental" ]; then
-               debsign python-radexreader_$version*.changes
                echo "=========================== lintian ($serie) =="
-               lintian -EviIL +pedantic *radexreader*$version*.deb
+               lintian -EviIL +pedantic python-radexreader_$version*.changes
+               rm *amd64.changes
        elif [ $serie = "unstable" ]; then
+               echo "=========================== debsign ($serie) =="
                debsign python-radexreader*$version-*_source.changes
        else
+               echo "=========================== debsign ($serie) =="
                debsign python-radexreader*$version*$serie*source.changes
        fi
        cd ..
 done
 
+
 printf "\n\n"
 ls -dlth "$PWD/"builder/*.deb "$PWD/"builder/*.changes
+printf "\n"
 rm -rf builder/*/
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-radexreader-1.2.5/scripts/debian/python3-radexreader.udev 
new/python-radexreader-1.3.0/scripts/debian/python3-radexreader.udev
--- old/python-radexreader-1.2.5/scripts/debian/python3-radexreader.udev        
2025-03-03 21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/python3-radexreader.udev        
2025-08-08 22:00:00.000000000 +0200
@@ -1,3 +1,3 @@
 SUBSYSTEM=="usb", ATTR{idVendor}=="03eb", ATTR{idProduct}=="5603", 
TAG+="uaccess"
 SUBSYSTEM=="usb", ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", 
TAG+="uaccess"
-SUBSYSTEM=="usb", ATTR{idVendor}=="abba", ATTR{idProduct}=="a011", 
TAG+="uaccess"
\ No newline at end of file
+SUBSYSTEM=="usb", ATTR{idVendor}=="abba", ATTR{idProduct}=="a011", 
TAG+="uaccess", RUN+="/sbin/modprobe cp210x" RUN+="/bin/sh -c 'echo abba a011 > 
/sys/bus/usb-serial/drivers/cp210x/new_id'"
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-radexreader-1.2.5/scripts/debian/radexreader.bash-completion 
new/python-radexreader-1.3.0/scripts/debian/radexreader.bash-completion
--- old/python-radexreader-1.2.5/scripts/debian/radexreader.bash-completion     
1970-01-01 01:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/radexreader.bash-completion     
2025-08-08 22:00:00.000000000 +0200
@@ -0,0 +1 @@
+data/radexreader.bash radexreader
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/rules 
new/python-radexreader-1.3.0/scripts/debian/rules
--- old/python-radexreader-1.2.5/scripts/debian/rules   2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/rules   2025-08-08 
22:00:00.000000000 +0200
@@ -3,7 +3,7 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-       dh $@ --with python3
+       dh $@ --with bash-completion --with python3
 
-override_dh_update_autotools_config:
+execute_before_dh_install:
        sed -i 's/radexreader-local /python3-radexreader-deb /g' 
src/radexreader-cli.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/debian/watch 
new/python-radexreader-1.3.0/scripts/debian/watch
--- old/python-radexreader-1.2.5/scripts/debian/watch   2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/debian/watch   2025-08-08 
22:00:00.000000000 +0200
@@ -1,5 +1,7 @@
 version=4
-opts="searchmode=plain,\
-filenamemangle=s%v?@ANY_VERSION@%@PACKAGE@-$1.tar.xz%" \
-https://api.github.com/repos/luigifab/python-radexreader/releases?per_page=50 \
-https://api.github.com/repos/[^/]+/[^/]+/tarball/v?@ANY_VERSION@
\ No newline at end of file
+opts=\
+filenamemangle=s%.*/@ANY_VERSION@%@PACKAGE@-$1.tar.gz%,\
+downloadurlmangle=s%(api.github.com/repos/[^/]+/[^/]+)/git/refs/%$1/tarball/refs/%g,\
+searchmode=plain \
+ 
https://api.github.com/repos/luigifab/python-radexreader/git/matching-refs/tags/v
 \
+ https://api.github.com/repos/[^/]+/[^/]+/git/refs/tags/@ANY_VERSION@
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-radexreader-1.2.5/scripts/fedora/python-radexreader.spec 
new/python-radexreader-1.3.0/scripts/fedora/python-radexreader.spec
--- old/python-radexreader-1.2.5/scripts/fedora/python-radexreader.spec 
2025-03-03 21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/fedora/python-radexreader.spec 
2025-08-08 22:00:00.000000000 +0200
@@ -18,7 +18,7 @@
 de débrancher l'appareil après l'installation.}
 
 Name:          python-radexreader
-Version:       1.2.5
+Version:       1.3.0
 Release:       1%{?dist}
 Summary:       %{common_summary_en}
 Summary(fr):   %{common_summary_fr}
@@ -26,6 +26,7 @@
 URL:           https://github.com/luigifab/python-radexreader
 Source0:       %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 
+
 BuildArch:     noarch
 BuildRequires: aspell-fr
 
@@ -34,12 +35,11 @@
 
 
 %package -n python3-radexreader
-%py_provides python3-radexreader
+%py_provides   python3-radexreader
 Summary:       %{common_summary_en}
 Summary(fr):   %{common_summary_fr}
 
 BuildRequires: python3-devel
-BuildRequires: python3-setuptools
 Requires:      python3
 Requires:      %{py3_dist pyserial}
 Requires:      %{py3_dist pyusb}
@@ -53,14 +53,19 @@
 sed -i 's/radexreader-local /python3-radexreader-rpm /g' src/radexreader-cli.py
 sed -i 's/\#\!\/usr\/bin\/python3/\#/g' src/radexreader/__init__.py
 
+%generate_buildrequires
+cd src
+%pyproject_buildrequires
+
 %build
 cd src
-%py3_build
+%pyproject_wheel
 
 %install
 cd src
-%py3_install
+%pyproject_install
 install -Dpm 755 radexreader-cli.py %{buildroot}%{_bindir}/radexreader
+install -Dpm 644 ../data/radexreader.bash 
%{buildroot}%{bash_completions_dir}/radexreader
 install -Dpm 644 ../data/radexreader.1 
%{buildroot}%{_mandir}/man1/radexreader.1
 install -Dpm 644 ../data/radexreader.fr.1 
%{buildroot}%{_mandir}/fr/man1/radexreader.1
 install -Dpm 644 ../scripts/debian/python3-radexreader.udev 
%{buildroot}/lib/udev/rules.d/60-%{name}.rules
@@ -68,15 +73,19 @@
 %files -n python3-radexreader
 %license LICENSE
 %doc README.md
-%ghost %{python3_sitelib}/radexreader*egg-info/
+%{python3_sitelib}/radexreader*dist-info/
 %{python3_sitelib}/radexreader/
 %{_bindir}/radexreader
+%{bash_completions_dir}/radexreader
 %{_mandir}/man1/radexreader.1*
 %{_mandir}/*/man1/radexreader.1*
 /lib/udev/rules.d/60-%{name}.rules
 
 
 %changelog
+* Fri Aug 08 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.3.0-1
+- New upstream release
+
 * Mon Mar 03 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.2.5-1
 - New upstream release
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/fedora/rpm.sh 
new/python-radexreader-1.3.0/scripts/fedora/rpm.sh
--- old/python-radexreader-1.2.5/scripts/fedora/rpm.sh  2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/fedora/rpm.sh  2025-08-08 
22:00:00.000000000 +0200
@@ -3,14 +3,17 @@
 # Fedora: configure: error: C compiler cannot create executables? remove and 
reinstall glibc-devel gcc
 
 cd "$(dirname "$0")"
-version="1.2.5"
+version="1.3.0"
 
 
 mkdir -p builder ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
 find builder/* ! -name "*$version*.rpm" ! -name "*$version*.gz" -exec rm -rf 
{} + 2>/dev/null
+rm -f ~/rpmbuild/SOURCES/python-radexreader-$version.tar.gz
 
 # copy to a tmp directory
 if [ true ]; then
+       rm python-radexreader.spec
+       wget 
https://raw.githubusercontent.com/luigifab/python-radexreader/refs/tags/v$version/scripts/fedora/python-radexreader.spec
        chmod 644 python-radexreader.spec
        spectool -g -R python-radexreader.spec
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-radexreader-1.2.5/scripts/mageia/python-radexreader.spec 
new/python-radexreader-1.3.0/scripts/mageia/python-radexreader.spec
--- old/python-radexreader-1.2.5/scripts/mageia/python-radexreader.spec 
2025-03-03 21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/mageia/python-radexreader.spec 
2025-08-08 22:00:00.000000000 +0200
@@ -18,7 +18,7 @@
 de débrancher l'appareil après l'installation.}
 
 Name:          python-radexreader
-Version:       1.2.5
+Version:       1.3.0
 Release:       %mkrel 1
 Summary:       %{common_summary_en}
 Summary(fr):   %{common_summary_fr}
@@ -62,6 +62,7 @@
 cd src
 %py3_install
 install -Dpm 755 radexreader-cli.py %{buildroot}%{_bindir}/radexreader
+install -Dpm 644 ../data/radexreader.bash 
%{buildroot}%{_datadir}/bash-completion/completions/radexreader
 install -Dpm 644 ../data/radexreader.1 
%{buildroot}%{_mandir}/man1/radexreader.1
 install -Dpm 644 ../data/radexreader.fr.1 
%{buildroot}%{_mandir}/fr/man1/radexreader.1
 install -Dpm 644 ../scripts/debian/python3-radexreader.udev 
%{buildroot}/lib/udev/rules.d/60-%{name}.rules
@@ -72,11 +73,33 @@
 %ghost %{python3_sitelib}/radexreader*egg-info/
 %{python3_sitelib}/radexreader/
 %{_bindir}/radexreader
+%{_datadir}/bash-completion/completions/radexreader
 %{_mandir}/man1/radexreader.1*
 %{_mandir}/*/man1/radexreader.1*
 /lib/udev/rules.d/60-%{name}.rules
 
 
 %changelog
-* Mon Mar 03 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.2.5-1.mga9
+* Fri Aug 08 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.3.0-1.mga
 - Initial Mageia package release (Closes: mbz#32828)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/mageia/rpm.sh 
new/python-radexreader-1.3.0/scripts/mageia/rpm.sh
--- old/python-radexreader-1.2.5/scripts/mageia/rpm.sh  2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/mageia/rpm.sh  2025-08-08 
22:00:00.000000000 +0200
@@ -3,14 +3,17 @@
 
 
 cd "$(dirname "$0")"
-version="1.2.5"
+version="1.3.0"
 
 
 mkdir -p builder ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
 find builder/* ! -name "*$version*.rpm" ! -name "*$version*.gz" -exec rm -rf 
{} + 2>/dev/null
+rm -f ~/rpmbuild/SOURCES/python-radexreader-$version.tar.gz
 
 # copy to a tmp directory
 if [ true ]; then
+       rm python-radexreader.spec
+       wget 
https://raw.githubusercontent.com/luigifab/python-radexreader/refs/tags/v$version/scripts/mageia/python-radexreader.spec
        chmod 644 python-radexreader.spec
        spectool -g -R python-radexreader.spec
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-radexreader-1.2.5/scripts/openmandriva/python-radexreader.spec 
new/python-radexreader-1.3.0/scripts/openmandriva/python-radexreader.spec
--- old/python-radexreader-1.2.5/scripts/openmandriva/python-radexreader.spec   
1970-01-01 01:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/openmandriva/python-radexreader.spec   
2025-08-08 22:00:00.000000000 +0200
@@ -0,0 +1,88 @@
+Name:          python-radexreader
+Version:       1.3.0
+Release:       1
+Summary:       Reader for the RADEX RD1212 and ONE Geiger counters
+Summary(fr):   Lecteur pour les compteurs Geiger RADEX RD1212 et ONE
+License:       GPL-2.0-or-later
+Group:         Development/Python
+URL:           https://github.com/luigifab/python-radexreader
+Source0:       %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
+
+BuildArch:     noarch
+BuildRequires: aspell-fr
+BuildRequires: python%{pyver}dist(setuptools)
+Requires:      pkgconfig(python3)
+Requires:      python%{pyver}dist(pyserial)
+Requires:      python%{pyver}dist(pyusb)
+
+%description %{expand:
+The RadexReader is an user-space driver for the RADEX RD1212 and
+the RADEX ONE Geiger counters. It allow to read and clear stored
+data via USB.
+
+To avoid Access denied (insufficient permissions), don't forget
+to unplug the device after installation.}
+
+%description -l fr %{expand:
+Le RadexReader est un pilote en espace utilisateur pour les compteurs
+Geiger RADEX RD1212 et RADEX ONE. Il permet de lire et d'effacer les
+données stockées via USB.
+
+Pour éviter un Access denied (insufficient permissions), n'oubliez pas
+de débrancher l'appareil après l'installation.}
+
+
+%prep
+%setup -q -n python-radexreader-%{version}
+sed -i 's/radexreader-local /python-radexreader-rpm /g' src/radexreader-cli.py
+sed -i 's/\#\!\/usr\/bin\/python3/\#/g' src/radexreader/__init__.py
+
+%build
+cd src
+%py3_build
+
+%install
+cd src
+%py3_install
+install -Dpm 755 radexreader-cli.py %{buildroot}%{_bindir}/radexreader
+install -Dpm 644 ../data/radexreader.bash 
%{buildroot}%{_datadir}/bash-completion/completions/radexreader
+install -Dpm 644 ../data/radexreader.1 
%{buildroot}%{_mandir}/man1/radexreader.1
+install -Dpm 644 ../data/radexreader.fr.1 
%{buildroot}%{_mandir}/fr/man1/radexreader.1
+install -Dpm 644 ../scripts/debian/python3-radexreader.udev 
%{buildroot}/lib/udev/rules.d/60-%{name}.rules
+
+%files
+%license LICENSE
+%doc README.md
+%ghost %{python3_sitelib}/radexreader*egg-info/
+%{python3_sitelib}/radexreader/
+%{_bindir}/radexreader
+%{_datadir}/bash-completion/completions/radexreader
+%{_mandir}/man1/radexreader.1*
+%{_mandir}/*/man1/radexreader.1*
+/lib/udev/rules.d/60-%{name}.rules
+
+
+%changelog
+* Fri Aug 08 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.3.0-1
+- New upstream release
+
+* Mon Mar 03 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.2.5-1
+- Initial OpenMandriva package release (Closes: #3169)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/openmandriva/rpm.sh 
new/python-radexreader-1.3.0/scripts/openmandriva/rpm.sh
--- old/python-radexreader-1.2.5/scripts/openmandriva/rpm.sh    1970-01-01 
01:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/openmandriva/rpm.sh    2025-08-08 
22:00:00.000000000 +0200
@@ -0,0 +1,54 @@
+#!/bin/bash
+
+
+
+cd "$(dirname "$0")"
+version="1.3.0"
+
+
+mkdir -p builder builder/{BUILD,RPMS,SRPMS}
+find builder/* ! -name "*$version*.rpm" ! -name "*$version*.gz" -exec rm -rf 
{} + 2>/dev/null
+
+
+# copy to a tmp directory
+if [ true ]; then
+       rm python-radexreader.spec
+       wget 
https://raw.githubusercontent.com/luigifab/python-radexreader/refs/tags/v$version/scripts/openmandriva/python-radexreader.spec
+       chmod 644 python-radexreader.spec
+       spectool -g -R python-radexreader.spec
+else
+       temp=python-radexreader-$version
+       mkdir /tmp/$temp
+       cp -r ../../* /tmp/$temp/
+       rm -rf /tmp/$temp/scripts/*/builder/ /tmp/$temp/radexreader/__pycache__/
+
+       mv /tmp/$temp builder/
+       cp /usr/share/common-licenses/GPL*2 builder/$temp/LICENSE
+
+       cd builder/
+       tar czf $temp.tar.gz $temp
+       cd ..
+
+       cp builder/$temp.tar.gz python-radexreader-$version.tar.gz
+       chmod 644 python-radexreader.spec
+fi
+
+# create package (rpm sign https://access.redhat.com/articles/3359321)
+cp -a python-radexreader-$version.tar.gz python-radexreader.spec builder/
+cd builder/
+abb builda
+rpm --addsign RPMS/*/python*radexreader*.rpm
+rpm --addsign SRPMS/python*radexreader*.rpm
+mv RPMS/*/python*radexreader*.rpm .
+mv SRPMS/python*radexreader*.rpm .
+echo "==========================="
+rpm --checksig *.rpm
+echo "==========================="
+rpmlint python-radexreader.spec *.rpm
+echo "==========================="
+ls -dlth "$PWD/"*.rpm
+echo "==========================="
+cd ..
+
+# cleanup
+rm -rf builder/*/ builder/*buildlog builder/*spec 
python-radexreader-$version.tar.gz
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/python-radexreader-1.2.5/scripts/opensuse/python-radexreader.spec 
new/python-radexreader-1.3.0/scripts/opensuse/python-radexreader.spec
--- old/python-radexreader-1.2.5/scripts/opensuse/python-radexreader.spec       
2025-03-03 21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/opensuse/python-radexreader.spec       
2025-08-08 22:00:00.000000000 +0200
@@ -1,6 +1,5 @@
-%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:          python-radexreader
-Version:       1.2.5
+Version:       1.3.0
 Release:       0
 Summary:       Reader for the RADEX RD1212 and ONE Geiger counters
 License:       GPL-2.0-or-later
@@ -8,25 +7,35 @@
 Source0:       %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
 
 BuildArch:     noarch
-BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module pip}
 BuildRequires: %{python_module pyserial}
 BuildRequires: %{python_module pyusb}
-BuildRequires: python-rpm-macros
+BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module wheel}
+BuildRequires: aspell-fr
 BuildRequires: fdupes
+BuildRequires: python-rpm-macros
 Requires:      python-pyserial
 Requires:      python-pyusb
 Requires(post):   update-alternatives
 Requires(postun): update-alternatives
-
 %python_subpackages
 
-%description
+%description %{expand:
 The RadexReader is an user-space driver for the RADEX RD1212 and
 the RADEX ONE Geiger counters. It allow to read and clear stored
 data via USB.
 
 To avoid Access denied (insufficient permissions), don't forget
-to unplug the device after installation.
+to unplug the device after installation.}
+
+%description -l fr %{expand:
+Le RadexReader est un pilote en espace utilisateur pour les compteurs
+Geiger RADEX RD1212 et RADEX ONE. Il permet de lire et d'effacer les
+données stockées via USB.
+
+Pour éviter un Access denied (insufficient permissions), n'oubliez pas
+de débrancher l'appareil après l'installation.}
 
 
 %prep
@@ -36,16 +45,18 @@
 
 %build
 cd src
-%python_build
+%pyproject_wheel
 
 %install
 cd src
-%python_install
+%pyproject_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 install -Dpm 755 radexreader-cli.py %{buildroot}%{_bindir}/radexreader
+install -Dpm 644 ../data/radexreader.bash 
%{buildroot}%{_datadir}/bash-completion/completions/radexreader
 install -Dpm 644 ../data/radexreader.1 
%{buildroot}%{_mandir}/man1/radexreader.1
 install -Dpm 644 ../data/radexreader.fr.1 
%{buildroot}%{_mandir}/fr/man1/radexreader.1
 %python_clone -a %{buildroot}%{_bindir}/radexreader
+%python_clone -a 
%{buildroot}%{_datadir}/bash-completion/completions/radexreader
 %python_clone -a %{buildroot}%{_mandir}/man1/radexreader.1
 %python_clone -a %{buildroot}%{_mandir}/fr/man1/radexreader.1
 %python_expand install -Dpm 644 ../scripts/debian/python3-radexreader.udev 
%{buildroot}%{_udevrulesdir}/60-python%{$python_bin_suffix}-radexreader.rules
@@ -53,9 +64,10 @@
 %files %{python_files}
 %license LICENSE
 %doc README.md
-%{python_sitelib}/radexreader/
-%{python_sitelib}/radexreader*egg-info/
+%{python_sitelib}/radexreader
+%{python_sitelib}/radexreader-%{version}.dist-info
 %python_alternative %{_bindir}/radexreader
+%python_alternative %{_datadir}/bash-completion/completions/radexreader
 %python_alternative %{_mandir}/man1/radexreader.1%{?ext_man}
 %python_alternative %{_mandir}/fr/man1/radexreader.1%{?ext_man}
 %{_udevrulesdir}/60-python%{python_bin_suffix}-radexreader.rules
@@ -68,6 +80,9 @@
 
 
 %changelog
+* Fri Aug 08 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.3.0-1
+- New upstream release
+
 * Mon Mar 03 2025 Fabrice Creuzot <c...@luigifab.fr> - 1.2.5-1
 - New upstream release
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/opensuse/rpm.sh 
new/python-radexreader-1.3.0/scripts/opensuse/rpm.sh
--- old/python-radexreader-1.2.5/scripts/opensuse/rpm.sh        2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/opensuse/rpm.sh        2025-08-08 
22:00:00.000000000 +0200
@@ -3,14 +3,17 @@
 
 
 cd "$(dirname "$0")"
-version="1.2.5"
+version="1.3.0"
 
 
 mkdir -p builder ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
 find builder/* ! -name "*$version*.rpm" ! -name "*$version*.gz" -exec rm -rf 
{} + 2>/dev/null
+rm -f ~/rpmbuild/SOURCES/python-radexreader-$version.tar.gz
 
 # copy to a tmp directory
 if [ true ]; then
+       rm python-radexreader.spec
+       wget 
https://raw.githubusercontent.com/luigifab/python-radexreader/refs/tags/v$version/scripts/opensuse/python-radexreader.spec
        chmod 644 python-radexreader.spec
        spectool -g -R python-radexreader.spec
 else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/scripts/pypi/pypi.sh 
new/python-radexreader-1.3.0/scripts/pypi/pypi.sh
--- old/python-radexreader-1.2.5/scripts/pypi/pypi.sh   2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/scripts/pypi/pypi.sh   2025-08-08 
22:00:00.000000000 +0200
@@ -3,7 +3,7 @@
 # Fedora: sudo dnf install python3-devel
 
 cd "$(dirname "$0")"
-version="1.2.5"
+version="1.3.0"
 rm -rf builder/
 
 mkdir builder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/src/radexreader/__init__.py 
new/python-radexreader-1.3.0/src/radexreader/__init__.py
--- old/python-radexreader-1.2.5/src/radexreader/__init__.py    2025-03-03 
21:00:00.000000000 +0100
+++ new/python-radexreader-1.3.0/src/radexreader/__init__.py    2025-08-08 
22:00:00.000000000 +0200
@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 # -*- coding: utf8 -*-
 # Created L/19/10/2020
-# Updated L/12/02/2024
+# Updated M/05/08/2025
 #
 # Copyright 2020-2025 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
 # https://github.com/luigifab/python-radexreader
@@ -27,7 +27,7 @@
 import serial
 import serial.tools.list_ports
 
-__version__ = '1.2.5'
+__version__ = '1.3.0'
 
 class RadexReader():
 
@@ -40,14 +40,15 @@
        keyD = None
 
        def disconnect(self):
+               # is it working?
                usb.util.dispose_resources(self.usb)
-               com = None
-               usb = None
-               serial = None
-               keyA = None
-               keyB = None
-               keyC = None
-               keyD = None
+               self.com = None
+               self.usb = None
+               self.serial = None
+               self.keyA = None
+               self.keyB = None
+               self.keyC = None
+               self.keyD = None
 
        def __init__(self):
 
@@ -64,8 +65,7 @@
                        for device in devices:
                                self.serial = serial.Serial(port=device.device, 
baudrate=9600, timeout=0.5)
                                return # device found
-                       if self.serial is None:
-                               raise ValueError('Error: RADEX ONE (serial) not 
found')
+                       raise ValueError('Error: RADEX ONE (serial) not found')
 
                # RADEX RD1212 v1
                # search usb device (10C4/EA60 = Silicon labs USB to UART 
bridge or CP2102 USB to UART Bridge Controller)
@@ -81,10 +81,9 @@
                        for device in devices:
                                self.serial = serial.Serial(port=device.device, 
baudrate=115200, timeout=0.5)
                                return # device found
-                       if self.serial is None:
-                               raise ValueError('Error: RADEX RD1212 (serial) 
not found')
+                       raise ValueError('Error: RADEX RD1212 (serial) not 
found')
 
-               # RADEX RD1212 v2
+               # RADEX RD1212 v2
                # search usb device (03EB/5603)
                self.usb = usb.core.find(idVendor=0x03eb, idProduct=0x5603, 
backend=backend)
                if self.usb is not None:
@@ -97,8 +96,7 @@
                        return # device found
 
                # no devices found
-               if self.usb is None:
-                       raise ValueError('Error: RADEX RD1212 (usb) and RADEX 
ONE (usb) not plugged?')
+               raise ValueError('Error: RADEX RD1212 (usb) and RADEX ONE (usb) 
not plugged?')
 
        def get_device(self, getusb=False):
                if not getusb and self.serial is not None:
@@ -116,7 +114,7 @@
                                hex(self.usb.idProduct) + ' ' + 
usb.util.get_string(self.usb, self.usb.iProduct) + ', ' +
                                self.serial.port + ')')
                elif self.com == 'ONEv1':
-                       if sys.platform != 'win32' and sys.platform != 'cygwin':
+                       if sys.platform not in ('win32', 'cygwin'):
                                return ('ONEv1 (' +
                                        hex(self.usb.idVendor)  + ' ' + 
usb.util.get_string(self.usb, self.usb.iManufacturer) + ', ' +
                                        hex(self.usb.idProduct) + ' ' + 
usb.util.get_string(self.usb, self.usb.iProduct) + ')')
@@ -208,7 +206,6 @@
                if self.com == 'ONEv1':
                        return self.readOne()
 
-               values = {}
                # from 0x0 to 0xb3
                if last and self.com == 'RD1212v2':
                        keys = [0x0]
@@ -219,16 +216,20 @@
 
                # 1 min, 5 min, 10 min, 30 min, 1 hour, 2 hours, 4 hours, 6 
hours, 12 hours, 24 hours
                interval = {0: 1, 1: 5, 2: 10, 3: 30, 4: 60, 5: 120, 6: 240, 7: 
360, 8: 720, 9: 1440}
+               values   = {}
 
                for key in keys:
                        self.hid_set_report((0x12, 0x12, 0x01, 0x02, key, 0, 0, 
0, 0, 0, 0, 0, 0x3c, 0x84))
                        hexa = self.hid_get_report()
-                       if hexa != b'' and hexa[0] != 0:
+                       if hexa != b'' and len(hexa) >= 9 and hexa[0] != 0:
                                # timestamp = 01/01/2016 00:00:44 = 1451606444
                                # timestamp = 01/01/2016 00:00:44 = 172 + 193 
(×256) + 133 (×256×256) + 86 (×256×256×256)
                                timestamp   = (hexa[2] + hexa[3] * 256 + 
hexa[4] * 256 * 256 + hexa[5] * 256 * 256 * 256)
                                # measure   = 0.15 µSv/h = 15
                                measure     = (hexa[6] + hexa[7] * 256) / 100
+                               # unlikely result
+                               if measure == 0:
+                                       continue
                                # uncertainty of the result
                                percent     = 15 + 6 / measure
                                measure_min = measure * (1 - percent / 100)
@@ -247,9 +248,13 @@
                                        'interval': interval[hexa[8]]
                                }
 
+               if len(values) < 1:
+                       return {}
+
                # most recent measure
                if last:
-                       return dict({ max(values): values[max(values)] }) if 
len(values) > 0 else values
+                       maxi = max(values)
+                       return dict({ maxi: values[maxi] })
 
                # sort measures by date
                return dict(sorted(values.items(), key=operator.itemgetter(0)))
@@ -257,13 +262,15 @@
        def readOne(self):
 
                if self.keyA is None:
-                       self.keyA = 0x04 - 0x04
+                       self.keyA = 0x04 - 0x04  # => 0x00
                        self.keyB = 0x00
-                       self.keyC = 0x5a + 0x04
+                       self.keyC = 0x5a + 0x04  # => 0x5e
                        self.keyD = 0x00
 
                self.keyA += 0x04
                self.keyC -= 0x04
+
+               # @todo it's wrong
                if self.keyA > 0xff:
                        self.keyA -= 0xfe
                        self.keyB += 0x01
@@ -278,11 +285,14 @@
 
                self.hid_set_report((0x7b, 0xff, 0x20, 0, 0x06, 0, self.keyA, 
self.keyB, 0, 0, self.keyC, self.keyD, 0, 0x08, 0x0c, 0, 0xf3, 0xf7))
                hexa = self.hid_get_report()
-
+               #if hexa and len(hexa) >= 31:
                # measure   = 0.15 µSv/h = 15 / 0.15 µSv accumulated = 15 / 15 
CPM = 15
                measure     = (hexa[20] + hexa[21] * 256 + hexa[22] * 256 * 
256) / 100
                measure_acc = (hexa[24] + hexa[25] * 256 + hexa[26] * 256 * 
256) / 100
                measure_cpm =  hexa[28] + hexa[29] * 256 + hexa[30] * 256 * 256
+               # unlikely result
+               if measure == 0:
+                       return {}
                # uncertainty of the result
                percent     = 15 + 6 / measure
                measure_min = measure * (1 - percent / 100)
@@ -291,18 +301,20 @@
                        measure_min = 0
                if percent > 99.9:
                        percent = 99.9
-
+               # most recent measure
                timestamp = int(time.time())
                return { timestamp: {
-                       'pct': percent,
-                       'min': measure_min,
-                       'val': measure,
-                       'max': measure_max,
-                       'acc': measure_acc,
-                       'cpm': measure_cpm,
+                       'pct':  percent,
+                       'min':  measure_min,
+                       'val':  measure,
+                       'max':  measure_max,
+                       'acc':  measure_acc,
+                       'cpm':  measure_cpm,
                        'time': timestamp
                } }
 
+               #return {}
+
        def erase(self):
                if self.com == 'RD1212v2':
                        self.hid_set_report((0x12, 0x12, 0x01, 0x03, 0, 0, 0, 
0, 0, 0, 0, 0, 0x3c, 0x84))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/python-radexreader-1.2.5/src/setup.py 
new/python-radexreader-1.3.0/src/setup.py
--- old/python-radexreader-1.2.5/src/setup.py   2025-03-03 21:00:00.000000000 
+0100
+++ new/python-radexreader-1.3.0/src/setup.py   2025-08-08 22:00:00.000000000 
+0200
@@ -1,7 +1,7 @@
 #!/usr/bin/python3
 # -*- coding: utf8 -*-
 # Created L/19/10/2020
-# Updated S/01/03/2025
+# Updated V/11/04/2025
 #
 # Copyright 2020-2025 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
 # https://github.com/luigifab/python-radexreader
@@ -26,7 +26,7 @@
                long_description = fh.read().replace('(images/', 
'(https://raw.githubusercontent.com/luigifab/python-radexreader/master/images/')
        setup(
                name='radexreader',
-               version='1.2.5',
+               version='1.3.0',
                description='Python library for the RADEX RD1212 and the RADEX 
ONE Geiger counters.',
                long_description=long_description,
                long_description_content_type='text/markdown',
@@ -40,7 +40,7 @@
 except:
        setup(
                name='radexreader',
-               version='1.2.5',
+               version='1.3.0',
                description='Python library for the RADEX RD1212 and the RADEX 
ONE Geiger counters.',
                license='GPL 2',
                author='Fabrice Creuzot',

Reply via email to