From 64dcaf6215a2d56accee01b0f25590907a92c6f818b0a810a4edd1d025aef835 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 12 Sep 2023 02:17:35 +0000 Subject: [PATCH] - Update to 2.4.40: * Generator: Lua: update to generate script that passes AP's luacheck * mavutil.py: add vtol mode mapping * add close method to binary reader * Split off MissionItemProtocol from WPLoader, use it for fence and rally * mavutil: add RTL mode for Blimp * generator: add support for relative path to lua mavlink module * WLUA - add new port for WSL 18570 * Fix mavlink Lua Generator for ardupilot lua comments and add it to test script * mavextra: added earth_accel for bin logs * XSD: MAV_CMD missionOnly attribute * mavgen_python: Add python3 target with type annotations * Use strings for char array mavlink fields again * Improve to_string and x25crc * gpslag: cope with GPS instances * mavextra: updated mag field tables * Fix mavutil.mavtcpin not closing the accept()ed port on close() * Generator for Ada language * mavutil: add force option to reboot_autopilot method * mavutil: do not consider MAV_AUTOPILOT_INVALID to be a vehicle heartbeat * generator-C: added last_status field for signing * Generator C: remove set but not used variable * Fix for when signing disabled * Fix the format of the output result of mavgen_cs.py * mavutil: Return mode as 'Mode(msg.custom_mode)' for high-latency streams * mavextra: cope with more Lat/Lon/Lng combinations * mavutil: fixed MavlinkSerialPort wrapper for python3 * generator: lua generator for ardupilot lua scripting * tools: add mavmerge to merge two tlogs OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymavlink?expand=0&rev=16 --- pymavlink-2.4.35.tar.gz | 3 -- pymavlink-2.4.40.tar.gz | 3 ++ python-pymavlink.changes | 55 +++++++++++++++++++++++++++++++++ python-pymavlink.spec | 35 ++++++++++----------- remove-future-requirement.patch | 42 +++++++++++++++++++++++++ 5 files changed, 117 insertions(+), 21 deletions(-) delete mode 100644 pymavlink-2.4.35.tar.gz create mode 100644 pymavlink-2.4.40.tar.gz create mode 100644 remove-future-requirement.patch diff --git a/pymavlink-2.4.35.tar.gz b/pymavlink-2.4.35.tar.gz deleted file mode 100644 index f98fa29..0000000 --- a/pymavlink-2.4.35.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3f6a6a73123ac3d730e1bdba83969de42796f527f57cd374146888cce59f3825 -size 10630937 diff --git a/pymavlink-2.4.40.tar.gz b/pymavlink-2.4.40.tar.gz new file mode 100644 index 0000000..102dec9 --- /dev/null +++ b/pymavlink-2.4.40.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3d6a552ad344a1fff9e0c811361ac9d8bb8201cf6aacad7224d516fa037ccb30 +size 11315893 diff --git a/python-pymavlink.changes b/python-pymavlink.changes index 0a0ce22..98c00b3 100644 --- a/python-pymavlink.changes +++ b/python-pymavlink.changes @@ -1,3 +1,58 @@ +------------------------------------------------------------------- +Tue Sep 12 02:16:35 UTC 2023 - Steve Kowalik + +- Update to 2.4.40: + * Generator: Lua: update to generate script that passes AP's luacheck + * mavutil.py: add vtol mode mapping + * add close method to binary reader + * Split off MissionItemProtocol from WPLoader, use it for fence and rally + * mavutil: add RTL mode for Blimp + * generator: add support for relative path to lua mavlink module + * WLUA - add new port for WSL 18570 + * Fix mavlink Lua Generator for ardupilot lua comments and add it to test + script + * mavextra: added earth_accel for bin logs + * XSD: MAV_CMD missionOnly attribute + * mavgen_python: Add python3 target with type annotations + * Use strings for char array mavlink fields again + * Improve to_string and x25crc + * gpslag: cope with GPS instances + * mavextra: updated mag field tables + * Fix mavutil.mavtcpin not closing the accept()ed port on close() + * Generator for Ada language + * mavutil: add force option to reboot_autopilot method + * mavutil: do not consider MAV_AUTOPILOT_INVALID to be a vehicle heartbeat + * generator-C: added last_status field for signing + * Generator C: remove set but not used variable + * Fix for when signing disabled + * Fix the format of the output result of mavgen_cs.py + * mavutil: Return mode as 'Mode(msg.custom_mode)' for high-latency streams + * mavextra: cope with more Lat/Lon/Lng combinations + * mavutil: fixed MavlinkSerialPort wrapper for python3 + * generator: lua generator for ardupilot lua scripting + * tools: add mavmerge to merge two tlogs + * tools: print progress in magfit_WMM + * mavutil: do not consider MAV_AUTOPILOT_INVALID to be a vehicle heartbeat + * mavgen: check for missing enums + * DFReader: added support for adding new messages to bin logs + * mavextra: removed cache from earth field calculations + * schema - Add Ampere-hours units + * DFReader.py: correct fatal error when stringifying FILE messages + * mavschema: add nanoseconds + * mavutil: add DOCK mode to rover + * mavextra.py: fix average(v, k, N) function + * mavftpdecode: fixed handling of defaults + * mavlogdump.py: don't die when handling + * Disable mavnative by default + * Tools: Magfit: throttle based + * DFReader: extract defaults from 4.3.x logs + * DFReader: fixed defaults handling + * mavwp: use is_location attribute of WP commands +- Switch to pyproject and autosetup macros. +- Package switched from sitearch to sitelib due to no mavnative +- Stop using globs in %files +- Add patch remove-future-requirement.patch, dropping future requirement + ------------------------------------------------------------------- Wed Oct 5 00:45:55 UTC 2022 - Yogalakshmi Arunachalam diff --git a/python-pymavlink.spec b/python-pymavlink.spec index da78f90..d21d3e9 100644 --- a/python-pymavlink.spec +++ b/python-pymavlink.spec @@ -1,7 +1,7 @@ # # spec file for package python-pymavlink # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # Copyright (c) 2019-2021, Martin Hauke # # All modifications and additions to the file contributed by third parties @@ -18,27 +18,27 @@ %define binaries mavtomfile mavtogpx mavsummarize mavsigloss mavsearch mavplayback mavparms mavparmdiff mavmission mavloss mavlogdump mavlink_bitmask_decoder mavkml mavgraph mavgpslock mavgen mavflighttime mavflightmodes mavfft_isb mavfft mavextract magfit_motors magfit_gps magfit_delta magfit_WMM magfit MPU6KSearch -%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pymavlink -Version: 2.4.35 +Version: 2.4.40 Release: 0 Summary: Python MAVLink code License: LGPL-3.0-only -Group: Development/Languages/Python URL: https://github.com/ArduPilot/pymavlink/ Source: https://files.pythonhosted.org/packages/source/p/pymavlink/pymavlink-%{version}.tar.gz +Patch0: remove-future-requirement.patch BuildRequires: %{python_module devel} -BuildRequires: %{python_module future} +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-future Requires: python-lxml Requires(post): update-alternatives Requires(postun):update-alternatives # SECTION test requirements BuildRequires: %{python_module lxml} # /SECTION +BuildArch: noarch %python_subpackages %description @@ -47,29 +47,28 @@ This allows for the creation of simple scripts to analyse telemetry logs from autopilots such as ArduPilot which use the MAVLink protocol. %prep -%setup -q -n pymavlink-%{version} +%autosetup -p1 -n pymavlink-%{version} %build -export CFLAGS="%{optflags}" -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install # drop shebang -%python_expand find %{buildroot}%{$python_sitearch} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \; +%python_expand find %{buildroot}%{$python_sitelib} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \; # FIXME: remove devel files for now -%python_expand rm -rf %{buildroot}%{$python_sitearch}/pymavlink/generator/C -%python_expand rm -rf %{buildroot}%{$python_sitearch}/pymavlink/generator/CPP11 -%python_expand rm -rf %{buildroot}%{$python_sitearch}/pymavlink/mavnative/mavlink_defaults.h +%python_expand rm -rf %{buildroot}%{$python_sitelib}/pymavlink/generator/C +%python_expand rm -rf %{buildroot}%{$python_sitelib}/pymavlink/generator/CPP11 +%python_expand rm -rf %{buildroot}%{$python_sitelib}/pymavlink/mavnative/mavlink_defaults.h # fix spurious exec permissions -%python_expand find %{buildroot}%{$python_sitearch} -name "*.xml" -exec chmod -x '{}' \; +%python_expand find %{buildroot}%{$python_sitelib} -name "*.xml" -exec chmod -x '{}' \; # strip .py file extension from scripts %python_expand cd %{buildroot}%{_bindir} && find . -name "*.py" -exec sh -c 'mv $0 `basename "$0" .py`' '{}' \; for b in %{binaries}; do %python_clone -a %{buildroot}%{_bindir}/$b done # -%python_expand %fdupes %{buildroot}%{$python_sitearch} +%python_expand %fdupes %{buildroot}%{$python_sitelib} # remove unneeded files rm -f %{buildroot}%{_bindir}/_current_flavor @@ -115,7 +114,7 @@ done %python_alternative %{_bindir}/mavsummarize %python_alternative %{_bindir}/mavtogpx %python_alternative %{_bindir}/mavtomfile -%{python_sitearch}/mavnative*.so -%{python_sitearch}/pymavlink* +%{python_sitelib}/pymavlink +%{python_sitelib}/pymavlink-%{version}.dist-info %changelog diff --git a/remove-future-requirement.patch b/remove-future-requirement.patch new file mode 100644 index 0000000..6cea42c --- /dev/null +++ b/remove-future-requirement.patch @@ -0,0 +1,42 @@ +Index: pymavlink-2.4.40/generator/mavgen.py +=================================================================== +--- pymavlink-2.4.40.orig/generator/mavgen.py ++++ pymavlink-2.4.40/generator/mavgen.py +@@ -23,9 +23,6 @@ General process: + ''' + + from __future__ import print_function +-from future import standard_library +-standard_library.install_aliases() +-from builtins import object + import os + import re + import sys +Index: pymavlink-2.4.40/setup.py +=================================================================== +--- pymavlink-2.4.40.orig/setup.py ++++ pymavlink-2.4.40/setup.py +@@ -156,7 +156,6 @@ setup (name = 'pymavlink', + 'tools/magfit_WMM.py', + ], + install_requires=[ +- 'future', + 'lxml', + ], + cmdclass={'build_py': custom_build_py}, +Index: pymavlink-2.4.40/tools/mavplayback.py +=================================================================== +--- pymavlink-2.4.40.orig/tools/mavplayback.py ++++ pymavlink-2.4.40/tools/mavplayback.py +@@ -7,11 +7,6 @@ realtime mavlink stream + Useful for visualising flights + ''' + from __future__ import print_function +-from future import standard_library +-standard_library.install_aliases() +- +-from builtins import object +- + import os + import sys + import time