forked from pool/python-PyMeeus
- Lowercase metadata directory name.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyMeeus?expand=0&rev=13
This commit is contained in:
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal 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
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.osc
|
||||
BIN
PyMeeus-0.5.12.tar.gz
LFS
Normal file
BIN
PyMeeus-0.5.12.tar.gz
LFS
Normal file
Binary file not shown.
86
pytest72.patch
Normal file
86
pytest72.patch
Normal file
@@ -0,0 +1,86 @@
|
||||
From f064abfda6b3cb48cb42a6827cd250413056f227 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org>
|
||||
Date: Sat, 6 Apr 2024 22:22:52 -0400
|
||||
Subject: [PATCH] fix pytest 7.2 compatibility
|
||||
|
||||
Pytest 7.2 deprecated plain top-level `setup()` and `teardown()`
|
||||
functions in favor of their own decorators:
|
||||
|
||||
https://docs.pytest.org/en/latest/changelog.html#pytest-7-2-0-2022-10-23
|
||||
https://docs.pytest.org/en/latest/deprecations.html#setup-teardown
|
||||
|
||||
Now we need to use module-level setup/teardown, which is extremely
|
||||
similar, just named differently:
|
||||
|
||||
https://docs.pytest.org/en/latest/how-to/xunit_setup.html#module-level-setup-teardown
|
||||
|
||||
We keep compatibility shims for older pytest releases.
|
||||
|
||||
Closes: #24
|
||||
---
|
||||
tests/test_curvefitting.py | 10 +++++++---
|
||||
tests/test_interpolation.py | 9 +++++++--
|
||||
2 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tests/test_curvefitting.py b/tests/test_curvefitting.py
|
||||
index 9398327..0d20cca 100644
|
||||
--- a/tests/test_curvefitting.py
|
||||
+++ b/tests/test_curvefitting.py
|
||||
@@ -31,9 +31,8 @@
|
||||
cf4 = CurveFitting()
|
||||
|
||||
|
||||
-def setup():
|
||||
+def setup_module():
|
||||
"""This function is used to set up the environment for the tests"""
|
||||
-
|
||||
# Set up a few CurveFitting objects
|
||||
cf1.set([73.0, 38.0, 35.0, 42.0, 78.0, 68.0, 74.0, 42.0, 52.0, 54.0, 39.0,
|
||||
61.0, 42.0, 49.0, 50.0, 62.0, 44.0, 39.0, 43.0, 54.0, 44.0, 37.0],
|
||||
@@ -58,10 +57,15 @@ def setup():
|
||||
-0.8372, -0.4377, -0.3640, -0.3508, -0.2126])
|
||||
|
||||
|
||||
-def teardown():
|
||||
+def teardown_module():
|
||||
pass
|
||||
|
||||
|
||||
+# pre pytest 7.2 compatibility
|
||||
+setup = setup_module
|
||||
+teardown = teardown_module
|
||||
+
|
||||
+
|
||||
# CurveFitting class
|
||||
|
||||
def test_curvefitting_constructor():
|
||||
diff --git a/tests/test_interpolation.py b/tests/test_interpolation.py
|
||||
index e853c37..08f7b6e 100644
|
||||
--- a/tests/test_interpolation.py
|
||||
+++ b/tests/test_interpolation.py
|
||||
@@ -32,7 +32,7 @@
|
||||
i_sine = Interpolation()
|
||||
|
||||
|
||||
-def setup():
|
||||
+def setup_module():
|
||||
"""This function is used to set up the environment for the tests"""
|
||||
# Set up a interpolation object which uses Right Ascension
|
||||
y0 = Angle(10, 18, 48.732, ra=True)
|
||||
@@ -64,10 +64,15 @@ def setup():
|
||||
0.5236885653, 0.5453707057])
|
||||
|
||||
|
||||
-def teardown():
|
||||
+def teardown_module():
|
||||
pass
|
||||
|
||||
|
||||
+# pre pytest 7.2 ompatibility
|
||||
+setup = setup_module
|
||||
+teardown = teardown_module
|
||||
+
|
||||
+
|
||||
# Interpolation class
|
||||
|
||||
def test_interpolation_constructor():
|
||||
61
python-PyMeeus.changes
Normal file
61
python-PyMeeus.changes
Normal file
@@ -0,0 +1,61 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 25 05:47:31 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Lowercase metadata directory name.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 20 18:25:54 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||
|
||||
- Clean up the SPEC file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 17 14:48:50 UTC 2024 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add patch pytest72.patch to fix compatibility with recent pytest
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 21 12:21:03 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- add sle15_python_module_pythons (jsc#PED-68)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 5 17:54:31 UTC 2023 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||
|
||||
- Update to 0.5.12:
|
||||
* Fixed a bug in the computation of the winter solstice. Added new tests and information about proper use of the library.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 18 11:27:06 UTC 2021 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||
|
||||
- Update to 0.5.11:
|
||||
* Added parameter `local` to the `Epoch` class constructor and
|
||||
the methods `get_date()` and `get_full_date()`.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 17 05:16:36 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 0.5.10:
|
||||
* Added methods ``moon_librations()`` and ``moon_position_angle_axis()``.
|
||||
* Added method ``moon_maximum_declination()``.
|
||||
* Fixed several bugs in ``Epoch`` class, and added method ``doy()``.
|
||||
* Added method ``moon_passage_nodes()``.
|
||||
* Added method ``moon_perigee_apogee()``.
|
||||
* Added method ``moon_phase()``.
|
||||
* Added methods ``illuminated_fraction_disk()`` and ``position_bright_limb()`` to ``Moon`` class.
|
||||
* Fixed error in the return type of method `Sun.equation_of_time()`.
|
||||
* Added methods to compute the Moon's longitude of ascending node and perigee.
|
||||
* Added `Moon` class and `position()` methods.
|
||||
* Added method `ring_parameters()` to Saturn class.
|
||||
* Added method `__hash__()` to Epoch. Now Epoch objects can be used as keys in a dictionary.
|
||||
* Added funtionality to compute the positions of Jupiter's Galilean moons.
|
||||
* Added methods to compute Saturn's ring inclination and longitude of ascending node.
|
||||
* Additional encoding changes.
|
||||
* Deleted `encoding` keyword from setup.py, which was giving problems.
|
||||
* Added encoding specification to setup.py.
|
||||
* Fixed characters with the wrong encoding.
|
||||
* Fixed undefined variable in `Epoch.tt2ut`.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 1 12:23:53 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
||||
|
||||
- Initial release (0.3.7)
|
||||
61
python-PyMeeus.spec
Normal file
61
python-PyMeeus.spec
Normal file
@@ -0,0 +1,61 @@
|
||||
#
|
||||
# spec file for package python-PyMeeus
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# 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/
|
||||
#
|
||||
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-PyMeeus
|
||||
Version: 0.5.12
|
||||
Release: 0
|
||||
Summary: Python implementation of Jean Meeus astronomical routines
|
||||
License: LGPL-3.0-only
|
||||
URL: https://github.com/architest/pymeeus
|
||||
Source: https://files.pythonhosted.org/packages/source/P/PyMeeus/PyMeeus-%{version}.tar.gz
|
||||
Patch0: pytest72.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
PyMeeus is a Python implementation of the astronomical algorithms
|
||||
described in the classical book "Astronomical Algorithms, 2nd Edition,
|
||||
Willmann-Bell Inc. (1998)" by Jean Meeus.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n PyMeeus-%{version}
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/pymeeus
|
||||
%{python_sitelib}/pymeeus-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
Reference in New Issue
Block a user