View | Details | Raw Unified | Return to bug 240736
Collapse All | Expand All

(-)py-ephem/Makefile (-8 / +11 lines)
Lines 1-20 Link Here
1
# Created by: db
1
# Created by: rhurlin
2
# $FreeBSD: head/astro/pyephem/Makefile 511276 2019-09-06 01:25:46Z wen $
2
# $FreeBSD$
3
3
4
PORTNAME=	pyephem
4
PORTNAME=	ephem
5
PORTVERSION=	3.7.7.0
5
PORTVERSION=	3.7.7.0
6
PORTEPOCH=	1
6
CATEGORIES=	astro math
7
CATEGORIES=	astro math hamradio
8
MASTER_SITES=	CHEESESHOP
7
MASTER_SITES=	CHEESESHOP
9
# XXX rename the directory too.
10
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
8
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
11
9
12
MAINTAINER=	wen@FreeBSD.org
10
MAINTAINER=	rhurlin@gwdg.de
13
COMMENT=	Scientific-grade astronomical computations for Python
11
COMMENT=	Compute positions of the planets and stars
14
12
15
LICENSE=	LGPL3
13
LICENSE=	LGPL3
16
14
17
USES=		python
15
USES=		python
18
USE_PYTHON=	autoplist distutils
16
USE_PYTHON=	autoplist distutils
17
18
#PLIST_SUB=	PORTVER=${PORTVERSION}
19
20
post-install:
21
	@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/ephem/_libastro.so
19
22
20
.include <bsd.port.mk>
23
.include <bsd.port.mk>
(-)py-ephem/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1567729453
1
TIMESTAMP = 1569078294
2
SHA256 (pyephem-3.7.7.0.tar.gz) = e1f3d455a780abe8afa7f2c7a76f70449f53c9147a20285c3c708cebeea63bf4
2
SHA256 (ephem-3.7.7.0.tar.gz) = 607148429f85412915e32265779c0cf6d09f73aa97cf1ff0d101ac22c69c4436
3
SIZE (pyephem-3.7.7.0.tar.gz) = 1266
3
SIZE (ephem-3.7.7.0.tar.gz) = 745041
(-)py-ephem/files/patch-setup.py (+24 lines)
Line 0 Link Here
1
--- setup.py.orig	2019-08-17 17:39:14 UTC
2
+++ setup.py
3
@@ -1,5 +1,6 @@
4
 import os
5
 import sys
6
+import io
7
 from distutils.core import setup, Extension
8
 from glob import glob
9
 
10
@@ -23,8 +24,13 @@ libastro_version = '3.7.7'
11
 libastro_files = glob('libastro-%s/*.c' % libastro_version)
12
 libastro_data = glob('extensions/data/*.c')
13
 
14
+# Currently ephem fails if the text files contain unicode characters.
15
+# To fix this we need to open the files as utf-8 explicitly.
16
+# Since open() in Python 2 doesn't support an encoding parameter,
17
+# use io.open() which works on both 2 and 3.
18
+
19
 def read(*filenames):
20
-    return open(os.path.join(os.path.dirname(__file__), *filenames)).read()
21
+    return io.open(os.path.join(os.path.dirname(__file__), *filenames), encoding="utf-8").read()
22
 
23
 extensions = [
24
     Extension('ephem._libastro',
(-)py-ephem/pkg-descr (-9 / +8 lines)
Lines 1-10 Link Here
1
PyEphem provides scientific-grade astronomical computations for the Python
1
PyEphem provides an ephem Python package for performing high-precision
2
programming language. Given a date and location on the Earth's surface, it can
2
astronomy computations. The underlying numeric routines are coded in C
3
compute the positions of the Sun and Moon, of the planets and their moons, and
3
and are the same ones that drive the popular XEphem astronomy application,
4
of any asteroids, comets, or earth satellites whose orbital elements the user
4
whose author, Elwood Charles Downey, generously gave permission for their
5
can provide. Additional functions are provided to compute the angular
5
use in PyEphem. The name ephem is short for the word ephemeris, which is
6
separation between two objects in the sky, to determine the constellation in
6
the traditional term for a table giving the position of a planet, asteroid,
7
which an object lies, and to find the times at which an object rises, transits,
7
or comet for a series of dates.
8
and sets on a particular day.
9
8
10
WWW: http://www.rhodesmill.org/brandon/projects/pyephem.html
9
WWW: https://pypi.org/project/ephem/

Return to bug 240736