1{ stdenv, buildPythonPackage, fetchPypi, isPy3k
2, glibcLocales, pytest }:
3
4buildPythonPackage rec {
5 pname = "ephem";
6 version = "3.7.6.0";
7
8 src = fetchPypi {
9 inherit pname version;
10 sha256 = "7a4c82b1def2893e02aec0394f108d24adb17bd7b0ca6f4bc78eb7120c0212ac";
11 };
12
13 patchFlags = "-p0";
14 checkInputs = [ pytest glibcLocales ];
15 # JPLTest uses assets not distributed in package
16 checkPhase = ''
17 LC_ALL="en_US.UTF-8" py.test --pyargs ephem.tests -k "not JPLTest"
18 '';
19
20 # Unfortunately, the tests are broken for Python 3 in 3.7.6.0. They have been
21 # fixed in https://github.com/brandon-rhodes/pyephem/commit/c8633854e2d251a198b0f701d0528b508baa2411
22 # but there has not been a new release since then.
23 doCheck = !isPy3k;
24
25 meta = with stdenv.lib; {
26 description = "Compute positions of the planets and stars";
27 homepage = https://pypi.python.org/pypi/ephem/;
28 license = licenses.lgpl3;
29 maintainers = with maintainers; [ chrisrosset ];
30 };
31}