diff options
author | Kubilay Kocak <koobs@FreeBSD.org> | 2019-12-20 10:07:27 +0000 |
---|---|---|
committer | Kubilay Kocak <koobs@FreeBSD.org> | 2019-12-20 10:07:27 +0000 |
commit | 17f97dd01cc7585723b151b492deb9ee21e04d91 (patch) | |
tree | c4cc35777ef70286422dc6791bd498c5472c0634 | |
parent | 50e2abbcb65399655022fd06e225b427e7b09fca (diff) | |
download | ports-17f97dd01cc7585723b151b492deb9ee21e04d91.tar.gz ports-17f97dd01cc7585723b151b492deb9ee21e04d91.zip |
MFH: r520162 [NEW] astro/py-ephem: Compute positions of the planets and stars
PyEphem provides an ephem Python package for performing high-precision
astronomy computations. The underlying numeric routines are coded in C
and are the same ones that drive the popular XEphem astronomy application,
whose author, Elwood Charles Downey, generously gave permission for their
use in PyEphem. The name ephem is short for the word ephemeris, which is
the traditional term for a table giving the position of a planet, asteroid,
or comet for a series of dates.
WWW: https://rhodesmill.org/pyephem/
WWW: https://pypi.org/project/ephem/
[1] Based on astro/pyephem
PR: 240736
Submitted by: Rainer Hurling <rhurlin gwdg de>
Approved by: ports-secteam (joneum)
Notes
Notes:
svn path=/branches/2019Q4/; revision=520492
-rw-r--r-- | astro/Makefile | 1 | ||||
-rw-r--r-- | astro/py-ephem/Makefile | 25 | ||||
-rw-r--r-- | astro/py-ephem/distinfo | 3 | ||||
-rw-r--r-- | astro/py-ephem/files/patch-setup.py | 31 | ||||
-rw-r--r-- | astro/py-ephem/pkg-descr | 10 |
5 files changed, 70 insertions, 0 deletions
diff --git a/astro/Makefile b/astro/Makefile index b3a927e49a10..6f844a2c0dc4 100644 --- a/astro/Makefile +++ b/astro/Makefile @@ -85,6 +85,7 @@ SUBDIR += py-aipy SUBDIR += py-astLib SUBDIR += py-astropy + SUBDIR += py-ephem SUBDIR += py-horoscopegenerator SUBDIR += py-metar SUBDIR += py-metpy diff --git a/astro/py-ephem/Makefile b/astro/py-ephem/Makefile new file mode 100644 index 000000000000..141af03c1681 --- /dev/null +++ b/astro/py-ephem/Makefile @@ -0,0 +1,25 @@ +# Created by: db +# $FreeBSD$ + +PORTNAME= ephem +PORTVERSION= 3.7.7.0 +CATEGORIES= astro math python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= rhurlin@gwdg.de +COMMENT= Compute positions of the planets and stars + +LICENSE= LGPL3 +LICENSE_FILE= ${WRKSRC}/COPYING + +USES= python +USE_PYTHON= autoplist distutils + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ephem/_libastro.so + +do-test: + @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test + +.include <bsd.port.mk> diff --git a/astro/py-ephem/distinfo b/astro/py-ephem/distinfo new file mode 100644 index 000000000000..c1da849db648 --- /dev/null +++ b/astro/py-ephem/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1576382931 +SHA256 (ephem-3.7.7.0.tar.gz) = 607148429f85412915e32265779c0cf6d09f73aa97cf1ff0d101ac22c69c4436 +SIZE (ephem-3.7.7.0.tar.gz) = 745041 diff --git a/astro/py-ephem/files/patch-setup.py b/astro/py-ephem/files/patch-setup.py new file mode 100644 index 000000000000..184acbc7f0f0 --- /dev/null +++ b/astro/py-ephem/files/patch-setup.py @@ -0,0 +1,31 @@ +--- 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', + ) diff --git a/astro/py-ephem/pkg-descr b/astro/py-ephem/pkg-descr new file mode 100644 index 000000000000..e1e13750f7d5 --- /dev/null +++ b/astro/py-ephem/pkg-descr @@ -0,0 +1,10 @@ +PyEphem provides an ephem Python package for performing high-precision +astronomy computations. The underlying numeric routines are coded in C +and are the same ones that drive the popular XEphem astronomy application, +whose author, Elwood Charles Downey, generously gave permission for their +use in PyEphem. The name ephem is short for the word ephemeris, which is +the traditional term for a table giving the position of a planet, asteroid, +or comet for a series of dates. + +WWW: https://rhodesmill.org/pyephem/ +WWW: https://pypi.org/project/ephem/ |