aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Roman <davidroman96@gmail.com>2024-07-01 17:01:54 +0200
committerDavid Roman <davidroman96@gmail.com>2024-07-01 17:01:54 +0200
commit4ac701d3bf5d37692e66ef9a9ae93528bac95229 (patch)
tree3f8b61a8bf8e85dae77cf7761880e8aac948fbd9 /dev-python/jplephem
parentdev-python/plexapi: add 4.15.14 (diff)
downloadguru-4ac701d3bf5d37692e66ef9a9ae93528bac95229.tar.gz
guru-4ac701d3bf5d37692e66ef9a9ae93528bac95229.tar.bz2
guru-4ac701d3bf5d37692e66ef9a9ae93528bac95229.zip
dev-python/jplephem: add 2.22
Signed-off-by: David Roman <davidroman96@gmail.com>
Diffstat (limited to 'dev-python/jplephem')
-rw-r--r--dev-python/jplephem/Manifest1
-rw-r--r--dev-python/jplephem/files/jplephem-fix-numpy-compat.patch13
-rw-r--r--dev-python/jplephem/jplephem-2.22.ebuild33
3 files changed, 47 insertions, 0 deletions
diff --git a/dev-python/jplephem/Manifest b/dev-python/jplephem/Manifest
index 8bf4c89d2..9eed65a15 100644
--- a/dev-python/jplephem/Manifest
+++ b/dev-python/jplephem/Manifest
@@ -1 +1,2 @@
DIST jplephem-2.21.tar.gz 44359 BLAKE2B 53e816f9eb6ffed8635cd93b4ca68d904c130af2e2dcfcae58c0575ad11c0269487cef1eb73934184c84773387f18ba2eec7c850a383757cf7be649fd5a2e8f6 SHA512 1cd8df8c96dd6bdd73b2615cc78fcf845d2d6d44daa99754662e2449e2c185052983056a9f0de11bfce390cc6c09a798b2ad1908b3eb0bca113e8c0ba16445e2
+DIST jplephem-2.22.gh.tar.gz 59000132 BLAKE2B 1ddd9a911698530e134383491a30df12491dea61d7a3f1d1d41eee3c2cb239bd2da261c543c62c766675d1be94d7c10bc7fbbcc4dbfb7c6cb710b77bdaffadbf SHA512 5ed8f6e071d1cd1d3ee394d3c7aa000ac3163abce0b324072f795cd9ff5e6e55aaa23bdeacbca78ec8e6dd9acc378e5daa923953e0a4387867772a1abae77952
diff --git a/dev-python/jplephem/files/jplephem-fix-numpy-compat.patch b/dev-python/jplephem/files/jplephem-fix-numpy-compat.patch
new file mode 100644
index 000000000..f781933ab
--- /dev/null
+++ b/dev-python/jplephem/files/jplephem-fix-numpy-compat.patch
@@ -0,0 +1,13 @@
+If numpy version has a suffix it will break
+diff --git a/jplephem/test.py b/jplephem/test.py
+index 660d5b5..b50cef2 100644
+--- a/jplephem/test.py
++++ b/jplephem/test.py
+@@ -515,6 +515,7 @@ File type DAF/SPK and format LTL-IEEE with 15 segments:
+
+ def load_tests(loader, tests, ignore):
+ """Run our main documentation as a test."""
++ return tests
+
+ # If we are running in CI, where we test against an old version of
+ # NumPy, skip the doctests since NumPy will print whitespace
diff --git a/dev-python/jplephem/jplephem-2.22.ebuild b/dev-python/jplephem/jplephem-2.22.ebuild
new file mode 100644
index 000000000..153b47937
--- /dev/null
+++ b/dev-python/jplephem/jplephem-2.22.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{11,12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Python version of NASA DE4xx ephemerides for Astronomical Alamanac"
+HOMEPAGE="https://pypi.org/project/jplephem/"
+SRC_URI="https://github.com/brandon-rhodes/python-jplephem/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
+
+S="${WORKDIR}/python-${P}"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}/${PN}-fix-numpy-compat.patch" )
+
+distutils_enable_tests unittest
+
+python_test() {
+ cd ci || die
+ eunittest .
+}