Date: Sun, 13 Jun 2021 16:52:43 GMT From: Rainer Hurling <rhurlin@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: dfc7f8bbc142 - main - astro/py-ephem: Update to 4.0.0.1 Message-ID: <202106131652.15DGqhKB060216@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by rhurlin: URL: https://cgit.FreeBSD.org/ports/commit/?id=dfc7f8bbc142a33293faf91573303d3d5ad13a13 commit dfc7f8bbc142a33293faf91573303d3d5ad13a13 Author: Rainer Hurling <rhurlin@FreeBSD.org> AuthorDate: 2021-06-13 16:41:37 +0000 Commit: Rainer Hurling <rhurlin@FreeBSD.org> CommitDate: 2021-06-13 16:52:36 +0000 astro/py-ephem: Update to 4.0.0.1 Major release update with many bugfixes, enhancements and some new features [1] [1] https://github.com/brandon-rhodes/pyephem/compare/v3.7.7.1...4.0.0 - Upgrade project to MIT license - Use Python>=3.7, because of UnicodeDecodeError in ascii.py - Generalize post-install target - Removed now unneeded files/patch-setup.py - Patch deprecated functions in test_satellity.py and _libastro.c All 160 tests run ok. Reported by: Repology --- astro/py-ephem/Makefile | 13 +++++---- astro/py-ephem/distinfo | 6 ++--- .../files/patch-ephem_tests_test__satellite.py | 11 ++++++++ astro/py-ephem/files/patch-extensions___libastro.c | 9 +++++++ astro/py-ephem/files/patch-setup.py | 31 ---------------------- 5 files changed, 31 insertions(+), 39 deletions(-) diff --git a/astro/py-ephem/Makefile b/astro/py-ephem/Makefile index 5a0bbf8c1508..63cb3d125ac5 100644 --- a/astro/py-ephem/Makefile +++ b/astro/py-ephem/Makefile @@ -1,7 +1,7 @@ # Created by: db PORTNAME= ephem -PORTVERSION= 3.7.7.1 +PORTVERSION= 4.0.0.1 CATEGORIES= astro math python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -9,16 +9,19 @@ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= rhurlin@FreeBSD.org COMMENT= Compute positions of the planets and stars -LICENSE= LGPL3 -LICENSE_FILE= ${WRKSRC}/COPYING +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE -USES= python:3.6+ +USES= python:3.7+ # Because of UnicodeDecodeError in ascii.py USE_PYTHON= autoplist distutils post-install: - @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ephem/_libastro*.so + @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ephem/_libastro${PYTHON_EXT_SUFFIX}.so do-test: + # WARNING: Testing via this command is deprecated and will be + # removed in a future version. Users looking for a generic test + # entry point independent of test runner are encouraged to use tox. @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test .include <bsd.port.mk> diff --git a/astro/py-ephem/distinfo b/astro/py-ephem/distinfo index 81650d016e53..f640065fc155 100644 --- a/astro/py-ephem/distinfo +++ b/astro/py-ephem/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1593676422 -SHA256 (ephem-3.7.7.1.tar.gz) = 36b51a8dc7cfdeb456dd6b8ab811accab8341b2d562ee3c6f4c86f6d3dbb984e -SIZE (ephem-3.7.7.1.tar.gz) = 745839 +TIMESTAMP = 1623597222 +SHA256 (ephem-4.0.0.1.tar.gz) = eca17a5149ce5666eb1500a0a9d90c9c97f90378e1879c7aaf55a890b9569cb8 +SIZE (ephem-4.0.0.1.tar.gz) = 738254 diff --git a/astro/py-ephem/files/patch-ephem_tests_test__satellite.py b/astro/py-ephem/files/patch-ephem_tests_test__satellite.py new file mode 100644 index 000000000000..498c97246dfd --- /dev/null +++ b/astro/py-ephem/files/patch-ephem_tests_test__satellite.py @@ -0,0 +1,11 @@ +--- ephem/tests/test_satellite.py.orig 2021-06-12 19:13:26 UTC ++++ ephem/tests/test_satellite.py +@@ -21,7 +21,7 @@ class SatelliteTests(unittest.TestCase): + lines = list(tle_lines) + lines[1] = lines[1][:-1] + '1' + expected = 'incorrect TLE checksum at end of line' +- self.assertRaisesRegexp(ValueError, expected, ephem.readtle, *lines) ++ self.assertRaisesRegex(ValueError, expected, ephem.readtle, *lines) + + def test_normal_methods(self): + for which in ['previous', 'next']: diff --git a/astro/py-ephem/files/patch-extensions___libastro.c b/astro/py-ephem/files/patch-extensions___libastro.c new file mode 100644 index 000000000000..e90b1852c6b3 --- /dev/null +++ b/astro/py-ephem/files/patch-extensions___libastro.c @@ -0,0 +1,9 @@ +--- extensions/_libastro.c.orig 2021-06-12 19:13:26 UTC ++++ extensions/_libastro.c +@@ -1,5 +1,6 @@ + /* Python header files. */ + ++#define PY_SSIZE_T_CLEAN + #include "Python.h" + + #if PY_MAJOR_VERSION == 2 diff --git a/astro/py-ephem/files/patch-setup.py b/astro/py-ephem/files/patch-setup.py deleted file mode 100644 index 184acbc7f0f0..000000000000 --- a/astro/py-ephem/files/patch-setup.py +++ /dev/null @@ -1,31 +0,0 @@ ---- setup.py.orig 2019-08-17 17:39:14 UTC -+++ setup.py -@@ -1,4 +1,13 @@ -+# Currently ephem fails if the text files contain unicode characters. -+# To fix this we need to open the files as utf-8 explicitly. -+# Since open() in Python 2 doesn't support an encoding parameter, -+# TODO: Upstream -+# -+# Add setup.py test command support to run tests -+# TODO: Upstream -+ - import os -+import io - import sys - from distutils.core import setup, Extension - from glob import glob -@@ -24,7 +33,7 @@ libastro_files = glob('libastro-%s/*.c' % libastro_ver - libastro_data = glob('extensions/data/*.c') - - def read(*filenames): -- return open(os.path.join(os.path.dirname(__file__), *filenames)).read() -+ return io.open(os.path.join(os.path.dirname(__file__), *filenames), encoding="utf-8").read() - - extensions = [ - Extension('ephem._libastro', -@@ -62,4 +71,5 @@ setup(name = 'ephem', - 'tests/usno/*.txt', - ],}, - ext_modules = extensions, -+ test_suite='ephem.tests', - )
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106131652.15DGqhKB060216>