14
0

Accepting request 749084 from home:mnhauke

Initial package for python-pymavlink

OBS-URL: https://build.opensuse.org/request/show/749084
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymavlink?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2019-11-18 07:46:56 +00:00
committed by Git OBS Bridge
commit de6aa70cc5
5 changed files with 134 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
pymavlink-2.4.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:28a0281c72b822a39f7393b375fdf1f4def37d0bf298a7d46839be97f8fd3b8a
size 3414093

4
python-pymavlink.changes Normal file
View File

@@ -0,0 +1,4 @@
-------------------------------------------------------------------
Sun Nov 10 09:50:34 UTC 2019 - Martin Hauke <mardnh@gmx.de>
- Initial package, version 2.4.0

103
python-pymavlink.spec Normal file
View File

@@ -0,0 +1,103 @@
#
# spec file for package python-pymavlink
#
# Copyright (c) 2019, 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 http://bugs.opensuse.org/
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pymavlink
Version: 2.4.0
Release: 0
License: LGPL-3.0
Summary: Python MAVLink code
Url: https://github.com/ArduPilot/pymavlink/
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/p/pymavlink/pymavlink-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module future}
# SECTION test requirements
BuildRequires: %{python_module lxml}
# /SECTION
BuildRequires: fdupes
Requires: python-future
Requires: python-lxml
%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
%setup -q -n pymavlink-%{version}
%build
export CFLAGS="%{optflags}"
%python_build
%install
%python_install
# drop shebang
%python_expand find %{buildroot}%{$python_sitearch} -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
# fix spurious exec permissions
%python_expand find %{buildroot}%{$python_sitearch} -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`' '{}' \;
#
%python_expand %fdupes %{buildroot}%{$python_sitearch}
# remove unneeded files
rm -f %{buildroot}%{_bindir}/_current_flavor
%check
# FIXME: testsuite does not run in OBS
#%%python_exec setup.py test
%files %{python_files}
%doc README.md
%python3_only %{_bindir}/MPU6KSearch
%python3_only %{_bindir}/magfit
%python3_only %{_bindir}/magfit_delta
%python3_only %{_bindir}/magfit_gps
%python3_only %{_bindir}/magfit_motors
%python3_only %{_bindir}/mavextract
%python3_only %{_bindir}/mavfft
%python3_only %{_bindir}/mavfft_isb
%python3_only %{_bindir}/mavflightmodes
%python3_only %{_bindir}/mavflighttime
%python3_only %{_bindir}/mavgen
%python3_only %{_bindir}/mavgpslock
%python3_only %{_bindir}/mavgraph
%python3_only %{_bindir}/mavkml
%python3_only %{_bindir}/mavlink_bitmask_decoder
%python3_only %{_bindir}/mavlogdump
%python3_only %{_bindir}/mavloss
%python3_only %{_bindir}/mavmission
%python3_only %{_bindir}/mavparmdiff
%python3_only %{_bindir}/mavparms
%python3_only %{_bindir}/mavplayback
%python3_only %{_bindir}/mavsearch
%python3_only %{_bindir}/mavsigloss
%python3_only %{_bindir}/mavsummarize
%python3_only %{_bindir}/mavtogpx
%python3_only %{_bindir}/mavtomfile
%{python_sitearch}/mavnative*.so
%{python_sitearch}/pymavlink*
%changelog