File python-skyfield.spec of Package python-skyfield
#
# spec file for package python-skyfield
#
# 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/
# Tests us unreleased "assay" package
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-skyfield
Version: 1.0
Release: 0
License: MIT
Summary: Elegant astronomy for Python
Url: http://github.com/brandon-rhodes/python-skyfield/
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/s/skyfield/skyfield-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module jplephem >= 2.3}
BuildRequires: %{python_module numpy}
BuildRequires: %{python_module sgp4 >= 1.4}
%if %{with test}
BuildRequires: %{python_module assay}
%endif
Requires: python-jplephem >= 2.3
Requires: python-numpy
Requires: python-sgp4 >= 1.4
Recommends: python-pytz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
Skyfield is a pure-Python astronomy package
that is compatible with both Python 2 and 3
and makes it easy to generate high precision research-grade
positions for planets and Earth satellites.
%prep
%setup -q -n skyfield-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
%python_expand assay-%{$python_bin_suffix} --batch skyfield.tests
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{python_sitelib}/*
%changelog