Files
nixpkgs/pkgs/development/python-modules/ephem/default.nix
Angel J cce2eafc31 python3Packages.ephem: cleanup, adopt, and modernize
Assisted-by: Cursor (Grok 4.7)
2026-11-10 18:33:02 -08:00

51 lines
1.1 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
setuptools,
}:
buildPythonPackage (finalAttrs: {
pname = "ephem";
version = "4.2.1";
pyproject = true;
src = fetchFromGitHub {
owner = "brandon-rhodes";
repo = "pyephem";
tag = finalAttrs.version;
hash = "sha256-oUeVpUX9Tcv6fSQku29mgVx0Je2X6TgIzHO8iuM5i+o=";
};
build-system = [ setuptools ];
nativeCheckInputs = [ pytestCheckHook ];
# The unpacked sources shadow the installed extension module.
preCheck = ''
rm -r ephem
'';
pytestFlags = [
"--pyargs"
"ephem.tests"
];
disabledTests = [
# unittest.load_tests() attaches the JPL ephemeris path. Pytest collects
# the bare JPLTest class, which has no path.
"JPLTest"
];
pythonImportsCheck = [ "ephem" ];
meta = {
description = "Scientific-grade astronomy routines for Python";
homepage = "https://github.com/brandon-rhodes/pyephem";
changelog = "https://github.com/brandon-rhodes/pyephem/blob/${finalAttrs.src.tag}/ephem/doc/CHANGELOG.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ iamanaws ];
};
})