Unverified Commit 9f91eeed authored by Amadej Kastelic's avatar Amadej Kastelic
Browse files

python3Packages.astroquery: modernize

parent 927ca2bb
Loading
Loading
Loading
Loading
+16 −17
Original line number Diff line number Diff line
{
  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 ];
  };
}