python3Packages.astroquery: modernize

This commit is contained in:
Amadej Kastelic
2025-07-11 19:52:28 +02:00
parent 927ca2bba0
commit 9f91eeedcb
@@ -1,7 +1,7 @@
{
pkgs,
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
astropy,
requests,
keyring,
@@ -17,22 +17,26 @@
pyvo,
astropy-helpers,
setuptools,
isPy3k,
}:
buildPythonPackage rec {
pname = "astroquery";
version = "0.4.10";
format = "pyproject";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-6s2R6do3jmQXQPvDEjhQ2qg7oJJqb/9MQMy/XcbVpAY=";
src = fetchFromGitHub {
owner = "astropy";
repo = "astroquery";
tag = "v${version}";
hash = "sha256-5pNKV+XNfUQca7WoWboVphXffzyVIHCmfxwr4nBMaEk=";
};
disabled = !isPy3k;
build-system = [
astropy-helpers
setuptools
];
propagatedBuildInputs = [
dependencies = [
astropy
requests
keyring
@@ -41,11 +45,6 @@ buildPythonPackage rec {
pyvo
];
nativeBuildInputs = [
astropy-helpers
setuptools
];
# Disable automatic update of the astropy-helper module
postPatch = ''
substituteInPlace setup.cfg --replace "auto_use = True" "auto_use = False"
@@ -77,10 +76,10 @@ buildPythonPackage rec {
pythonImportsCheck = [ "astroquery" ];
meta = with pkgs.lib; {
meta = {
description = "Functions and classes to access online data resources";
homepage = "https://astroquery.readthedocs.io/";
license = licenses.bsd3;
maintainers = [ maintainers.smaret ];
license = lib.licenses.bsd3;
maintainers = [ lib.maintainers.smaret ];
};
}