Merge pull request #321474 from fabaff/photutils

python312Packages.photutils: init at 1.12.0
This commit is contained in:
Fabian Affolter 2024-06-22 13:18:34 +02:00 committed by GitHub
commit bcf44e06b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 393 additions and 0 deletions

View File

@ -0,0 +1,70 @@
{
lib,
asdf-coordinates-schemas,
asdf-standard,
asdf-transform-schemas,
asdf,
astropy,
buildPythonPackage,
fetchFromGitHub,
numpy,
packaging,
pytest-astropy,
pytestCheckHook,
pythonOlder,
scipy,
setuptools-scm,
setuptools,
tomli,
wheel,
}:
buildPythonPackage rec {
pname = "asdf-astropy";
version = "0.6.1";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "astropy";
repo = "asdf-astropy";
rev = "refs/tags/${version}";
hash = "sha256-dOd9QdBOu7QotRiHkXJoIqaHG6U9odTlRmy22/nvvuw=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
propagatedBuildInputs = [
asdf
asdf-coordinates-schemas
asdf-standard
asdf-transform-schemas
astropy
numpy
packaging
];
nativeCheckInputs = [
pytest-astropy
pytestCheckHook
scipy
];
pythonImportsCheck = [ "asdf_astropy" ];
preCheck = ''
export HOME=$(mktemp -d)
'';
meta = with lib; {
description = "Extension library for ASDF to provide support for Astropy";
homepage = "https://github.com/astropy/asdf-astropy";
changelog = "https://github.com/astropy/asdf-astropy/blob/${version}/CHANGES.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,48 @@
{
lib,
asdf-standard,
asdf,
buildPythonPackage,
fetchFromGitHub,
pythonOlder,
setuptools-scm,
setuptools,
}:
buildPythonPackage rec {
pname = "asdf-coordinates-schemas";
version = "0.3.0";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "asdf-format";
repo = "asdf-coordinates-schemas";
rev = "refs/tags/${version}";
hash = "sha256-LuC0m25OqQwivK/Z3OfoCtdhBV87rk16XrkJxUxG07o=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
asdf
asdf-standard
];
# Circular dependency with asdf-astropy
doCheck = false;
pythonImportsCheck = [ "asdf_coordinates_schemas" ];
meta = with lib; {
description = "ASDF schemas for coordinates";
homepage = "https://github.com/asdf-format/asdf-coordinates-schemas";
changelog = "https://github.com/asdf-format/asdf-coordinates-schemas/blob/${version}/CHANGES.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,56 @@
{
lib,
asdf-astropy,
asdf-coordinates-schemas,
asdf-standard,
asdf-transform-schemas,
asdf,
buildPythonPackage,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
setuptools-scm,
setuptools,
}:
buildPythonPackage rec {
pname = "asdf-wcs-schemas";
version = "0.4.0";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
owner = "asdf-format";
repo = "asdf-wcs-schemas";
rev = "refs/tags/${version}";
hash = "sha256-4CxKLMYXdNkNwkfFRX3YKkS4e+Z3wQgmz8ogbC4Z1vI=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
asdf-coordinates-schemas
asdf-standard
asdf-transform-schemas
];
nativeCheckInputs = [
asdf
asdf-astropy
pytestCheckHook
];
pythonImportsCheck = [ "asdf_wcs_schemas" ];
meta = with lib; {
description = "World Coordinate System (WCS) ASDF schemas";
homepage = "https://github.com/asdf-format/asdf-wcs-schemas";
changelog = "https://github.com/asdf-format/asdf-wcs-schemas/blob/${version}/CHANGES.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,57 @@
{
lib,
buildPythonPackage,
cython,
fetchFromGitHub,
pip,
pytestCheckHook,
pythonOlder,
setuptools-scm,
setuptools,
tomli,
wheel,
}:
buildPythonPackage rec {
pname = "extension-helpers";
version = "1.1.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "astropy";
repo = "extension-helpers";
rev = "refs/tags/v${version}";
hash = "sha256-pYCSLb6uuQ9ZtMZOQH0DxLlfgFv3tgH+AL35IN71cNI=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [ setuptools ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
nativeCheckInputs = [
pytestCheckHook
pip
];
pythonImportsCheck = [ "extension_helpers" ];
pytestFlagsArray = [ "extension_helpers/tests" ];
disabledTests = [
# Test require network access
"test_only_pyproject"
];
meta = with lib; {
description = "Helpers to assist with building Python packages with compiled C/Cython extensions";
homepage = "https://github.com/astropy/extension-helpers";
changelog = "https://github.com/astropy/extension-helpers/blob/${version}/CHANGES.md";
license = licenses.bsd3;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -0,0 +1,61 @@
{
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 ];
};
}

View File

@ -0,0 +1,89 @@
{
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 ];
};
}

View File

@ -787,10 +787,16 @@ self: super: with self; {
asdf = callPackage ../development/python-modules/asdf { };
asdf-astropy = callPackage ../development/python-modules/asdf-astropy { };
asdf-coordinates-schemas = callPackage ../development/python-modules/asdf-coordinates-schemas { };
asdf-standard = callPackage ../development/python-modules/asdf-standard { };
asdf-transform-schemas = callPackage ../development/python-modules/asdf-transform-schemas { };
asdf-wcs-schemas = callPackage ../development/python-modules/asdf-wcs-schemas { };
ase = callPackage ../development/python-modules/ase { };
asf-search = callPackage ../development/python-modules/asf-search { };
@ -4043,6 +4049,8 @@ self: super: with self; {
exitcode = callPackage ../development/python-modules/exitcode { };
extension-helpers = callPackage ../development/python-modules/extension-helpers { };
extract-msg = callPackage ../development/python-modules/extract-msg { };
extractcode = callPackage ../development/python-modules/extractcode { };
@ -5279,6 +5287,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 { };
@ -9784,6 +9794,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 { };