Commit a654343c authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python312Packages.gwcs: init at 0.21.0

parent b02b3a72
Loading
Loading
Loading
Loading
+61 −0
Original line number Diff line number Diff line
{
  lib,
  asdf-astropy,
  asdf-wcs-schemas,
  asdf,
  astropy,
  buildPythonPackage,
  fetchFromGitHub,
  numpy,
  pytest-astropy,
  pytestCheckHook,
  pythonOlder,
  scipy,
  setuptools-scm,
  setuptools,
  tomli,
}:

buildPythonPackage rec {
  pname = "gwcs";
  version = "0.21.0";
  pyproject = true;

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "spacetelescope";
    repo = "gwcs";
    rev = "refs/tags/${version}";
    hash = "sha256-76h2lDIaPHj7HarVcE0t5k6CA/hLCwquaz+2wMsKj+Y=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  dependencies = [
    asdf
    asdf-astropy
    asdf-wcs-schemas
    astropy
    numpy
    scipy
  ];

  nativeCheckInputs = [
    pytest-astropy
    pytestCheckHook
  ];

  pythonImportsCheck = [ "gwcs" ];

  meta = with lib; {
    description = "Module to manage the Generalized World Coordinate System";
    homepage = "https://github.com/spacetelescope/gwcs";
    changelog = "https://github.com/spacetelescope/gwcs/blob/${version}/CHANGES.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab ];
  };
}
+89 −0
Original line number Diff line number Diff line
{
  lib,
  astropy,
  bottleneck,
  buildPythonPackage,
  cython,
  extension-helpers,
  fetchFromGitHub,
  gwcs,
  matplotlib,
  numpy,
  photutils,
  pythonOlder,
  rasterio,
  scikit-image,
  scikit-learn,
  scipy,
  setuptools-scm,
  setuptools,
  shapely,
  tomli,
  tqdm,
  python,
  wheel,
}:

buildPythonPackage rec {
  pname = "photutils";
  version = "1.12.0";
  pyproject = true;

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "astropy";
    repo = "photutils";
    rev = "refs/tags/${version}";
    hash = "sha256-k5MxpkCAvefSRoNPMAVIvNcCTU5HPicU4XSFXk13O9Q=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "'numpy>=2.0.0rc1'," ""
  '';
  
  build-system = [
    setuptools
    setuptools-scm
    wheel
  ];

  nativeBuildInputs = [
    cython
    extension-helpers
    numpy
  ];

  dependencies = [
    astropy
    numpy
  ];

  passthru.optional-dependencies = {
    all = [
      bottleneck
      gwcs
      matplotlib
      rasterio
      scikit-image
      scikit-learn
      scipy
      shapely
      tqdm
    ];
  };

  # With 1.12.0 tests have issues importing modules 
  doCheck = false;

  pythonImportsCheck = [ "photutils" ];

  meta = with lib; {
    description = "Astropy package for source detection and photometry";
    homepage = "https://github.com/astropy/photutils";
    changelog = "https://github.com/astropy/photutils/blob/${version}/CHANGES.rst";
    license = licenses.bsd3;
    maintainers = with maintainers; [ fab ];
  };
}
+4 −0
Original line number Diff line number Diff line
@@ -5266,6 +5266,8 @@ self: super: with self; {
  gviz-api = callPackage ../development/python-modules/gviz-api { };
  gwcs = callPackage ../development/python-modules/gwcs { };
  gym = callPackage ../development/python-modules/gym { };
  gym-notices = callPackage ../development/python-modules/gym-notices { };
@@ -9766,6 +9768,8 @@ self: super: with self; {
  phonenumbers = callPackage ../development/python-modules/phonenumbers { };
  photutils = callPackage ../development/python-modules/photutils { };
  pkgutil-resolve-name = callPackage ../development/python-modules/pkgutil-resolve-name { };
  pkg-about = callPackage ../development/python-modules/pkg-about { };