File python-sgp4.spec of Package python-sgp4
#
# spec file for package python-sgp4
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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-%{**}}
%bcond_without test
Name: python-sgp4
Version: 1.4
Release: 0
License: MIT
Summary: Track earth satellite TLE orbits using up-to-date 2010 version of SGP4
Url: https://github.com/brandon-rhodes/python-sgp4
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/s/sgp4/sgp4-%{version}.tar.gz
# Test files
Source10: https://raw.githubusercontent.com/brandon-rhodes/python-sgp4/v1.4/sgp4/tcppver.out
Source11: https://raw.githubusercontent.com/brandon-rhodes/python-sgp4/v1.4/sgp4/SGP4-VER.TLE
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
This Python package computes the position and velocity of an
earth-orbiting satellite, given the satellite's TLE orbital elements
from a source like `Celestrak <http://celestrak.com/>`_. It implements
the most recent version of SGP4, and is regularly run against the SGP4
test suite to make sure that its satellite position predictions **agree
to within 0.1 mm** of the predictions of the standard C++ implementation
of the algorithm. This error is far less than the 1–3 km/day by which
satellites themselves deviate from the ideal orbits described in TLE
files.
%prep
%setup -q -n sgp4-%{version}
cp %{SOURCE10} sgp4
cp %{SOURCE11} sgp4
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_exec -m unittest discover sgp4
%endif
%files %{python_files}
%defattr(-,root,root,-)
%{python_sitelib}/*
%changelog