14
0
Files
python-pymavlink/python-pymavlink.spec

117 lines
4.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-pymavlink
#
# Copyright (c) 2025 SUSE LLC
Accepting request 925839 from home:mnhauke - Update to version 2.4.17 * DFREader: allow ISO-8859-1 as fallback for logs * mavfft_isb: allow all HNTCH options to be printed * mavgen_python.py: try both tostring and tobytes when checking signature * DFReader: use tobytes for py3 in get_msgbuf * mavutil: fix docstring typo * tools: mavfft_isb add file names to legend for multiple files * tools: add axis plot option to mavfft_isb - Update to version 2.4.16 * Add Blimp modes * mavutil: add new AUTO_RTL mode 27 to copter * Tools: magfit_WMM: add option to save plot and param file * mavmmaplog: Close the mmap object * Update mavlink_signature_check code to be compiler agnostic * mavgen_java: Don't hardcode sysid and compid when packing * Fix typos discovered by codespell * Test on the current versions of Python * Fix a typo discovered by codespell * Fix typos * mavutil: correct parsing of truncated tlogs * DFReader.py: fix qnan detection under Python3 * mavutil.py: update mode mapping for copter * added bitmask attribute to MAVEnum * build(deps): bump lodash in /generator/javascript_stable * build(deps): bump underscore in /generator/javascript * build(deps): bump underscore in /generator/javascript_stable * build(deps): bump lodash in /generator/javascript * Bugfix accessing wrong property * mavlogdump: added mode to --meta * mavextra: improved distance_two() OBS-URL: https://build.opensuse.org/request/show/925839 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymavlink?expand=0&rev=13
2021-10-19 12:25:00 +00:00
# Copyright (c) 2019-2021, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%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
%bcond_without libalternatives
Name: python-pymavlink
Version: 2.4.41
Release: 0
Summary: Python MAVLink code
License: LGPL-3.0-only
URL: https://github.com/ArduPilot/pymavlink/
Source: https://files.pythonhosted.org/packages/source/p/pymavlink/pymavlink-%{version}.tar.gz
- 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
2023-09-12 02:17:35 +00:00
Patch0: remove-future-requirement.patch
BuildRequires: %{python_module devel}
- 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
2023-09-12 02:17:35 +00:00
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
- 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
2023-09-12 02:17:35 +00:00
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-lxml
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module lxml}
# /SECTION
%python_subpackages
%description
A Python library for handling MAVLink protocol streams and log files.
This allows for the creation of simple scripts to analyse telemetry
logs from autopilots such as ArduPilot which use the MAVLink protocol.
%prep
- 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
2023-09-12 02:17:35 +00:00
%autosetup -p1 -n pymavlink-%{version}
%build
- 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
2023-09-12 02:17:35 +00:00
%pyproject_wheel
%install
- 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
2023-09-12 02:17:35 +00:00
%pyproject_install
# drop shebang
- 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
2023-09-12 02:17:35 +00:00
%python_expand find %{buildroot}%{$python_sitelib} -name "*.py" -exec sed -i -e '/^#!\//, 1d' {} \;
# FIXME: remove devel files for now
- 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
2023-09-12 02:17:35 +00:00
%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
- 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
2023-09-12 02:17:35 +00:00
%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
#
- 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
2023-09-12 02:17:35 +00:00
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# remove unneeded files
rm -f %{buildroot}%{_bindir}/_current_flavor
%check
# no tests in PyPI tarball, no tags in upstream repo
%pre
for b in %{binaries}; do
%python_libalternatives_reset_alternative $b
done
%files %{python_files}
%doc README.md
%python_alternative %{_bindir}/MPU6KSearch
%python_alternative %{_bindir}/magfit
%python_alternative %{_bindir}/magfit_WMM
%python_alternative %{_bindir}/magfit_delta
%python_alternative %{_bindir}/magfit_gps
%python_alternative %{_bindir}/magfit_motors
%python_alternative %{_bindir}/mavextract
%python_alternative %{_bindir}/mavfft
%python_alternative %{_bindir}/mavfft_isb
%python_alternative %{_bindir}/mavflightmodes
%python_alternative %{_bindir}/mavflighttime
%python_alternative %{_bindir}/mavgen
%python_alternative %{_bindir}/mavgpslock
%python_alternative %{_bindir}/mavgraph
%python_alternative %{_bindir}/mavkml
%python_alternative %{_bindir}/mavlink_bitmask_decoder
%python_alternative %{_bindir}/mavlogdump
%python_alternative %{_bindir}/mavloss
%python_alternative %{_bindir}/mavmission
%python_alternative %{_bindir}/mavparmdiff
%python_alternative %{_bindir}/mavparms
%python_alternative %{_bindir}/mavplayback
%python_alternative %{_bindir}/mavsearch
%python_alternative %{_bindir}/mavsigloss
%python_alternative %{_bindir}/mavsummarize
%python_alternative %{_bindir}/mavtogpx
%python_alternative %{_bindir}/mavtomfile
- 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
2023-09-12 02:17:35 +00:00
%{python_sitelib}/pymavlink
%{python_sitelib}/pymavlink-%{version}.dist-info
%changelog