Install this version:
emerge -a =dev-python/photutils-3.0.0
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-python/photutils-3.0.0
Or alternatively:
emerge --autounmask-write -a =dev-python/photutils-3.0.0
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..13} )
DATA_COM="8c97b4f"
DATA_URI="https://github.com/astropy/photutils-datasets/raw/${DATA_COM}/data"
inherit distutils-r1 optfeature pypi
DESCRIPTION="Affiliated package for image photometry utilities"
HOMEPAGE="https://photutils.readthedocs.io"
SRC_URI+=" local-datasets? (
${DATA_URI}/M6707HH.fits -> ${PN}-${DATA_COM}-d-M6707HH.fits
${DATA_URI}/hst_wfc3ir_f160w_simulated_starfield.fits -> ${PN}-${DATA_COM}-d-hst_wfc3ir_f160w_simulated_starfield.fits
${DATA_URI}/irac_ch1_flight.fits -> ${PN}-${DATA_COM}-d-irac_ch1_flight.fits
${DATA_URI}/irac_ch2_flight.fits -> ${PN}-${DATA_COM}-d-irac_ch2_flight.fits
${DATA_URI}/irac_ch3_flight.fits -> ${PN}-${DATA_COM}-d-irac_ch3_flight.fits
${DATA_URI}/irac_ch4_flight.fits -> ${PN}-${DATA_COM}-d-irac_ch4_flight.fits
${DATA_URI}/spitzer_example_catalog.xml -> ${PN}-${DATA_COM}-d-spitzer_example_catalog.xml
${DATA_URI}/spitzer_example_image.fits -> ${PN}-${DATA_COM}-d-spitzer_example_image.fits
)
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="all doc intersphinx local-datasets"
PROPERTIES="test_network"
RESTRICT="test
intersphinx? ( network-sandbox )"
REQUIRED_USE="intersphinx? ( doc )
doc? ( local-datasets )"
DEPEND=">=dev-python/numpy-2.0[${PYTHON_USEDEP}]"
RDEPEND="${DEPEND}
>=dev-python/astropy-6.1.4[${PYTHON_USEDEP}]
>=dev-python/scipy-1.13[${PYTHON_USEDEP}]
all? (
>=dev-python/bottleneck-1.4[${PYTHON_USEDEP}]
>=dev-python/gwcs-0.20[${PYTHON_USEDEP}]
>=dev-python/matplotlib-3.9[${PYTHON_USEDEP}]
>=dev-python/rasterio-1.4[${PYTHON_USEDEP}]
>=dev-python/regions-0.9[${PYTHON_USEDEP}]
>=dev-python/scikit-image-0.23[${PYTHON_USEDEP}]
>=dev-python/shapely-2.0[${PYTHON_USEDEP}]
>=dev-python/tqdm-4.66[${PYTHON_USEDEP}]
)
"
BDEPEND=">=dev-python/setuptools-scm-8.1[${PYTHON_USEDEP}]
>=dev-python/cython-3.1.2[${PYTHON_USEDEP}]
<dev-python/cython-4[${PYTHON_USEDEP}]
>=dev-python/extension-helpers-1.3[${PYTHON_USEDEP}]
doc? (
${RDEPEND}
>=dev-python/sphinx-astropy-1.9.1[${PYTHON_USEDEP},confv2]
>=dev-python/sphinx-design-0.6[${PYTHON_USEDEP}]
>=dev-python/sphinx-reredirects-1.1[${PYTHON_USEDEP}]
dev-python/rasterio[${PYTHON_USEDEP}]
dev-python/scikit-image[${PYTHON_USEDEP}]
dev-python/shapely[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/tomli[${PYTHON_USEDEP}]' python3_10)
media-gfx/graphviz
)
test? (
dev-python/bottleneck[${PYTHON_USEDEP}]
dev-python/scikit-image[${PYTHON_USEDEP}]
dev-python/regions[${PYTHON_USEDEP}]
dev-python/gwcs[${PYTHON_USEDEP}]
dev-python/matplotlib[${PYTHON_USEDEP}]
dev-python/rasterio[${PYTHON_USEDEP}]
dev-python/shapely[${PYTHON_USEDEP}]
dev-python/tqdm[${PYTHON_USEDEP}]
)
"
EPYTEST_PLUGINS=( pytest-{astropy-header,doctestplus,remotedata} )
distutils_enable_tests pytest
# TODO: Fix this
# NameError: name 'disabled_intersphinx_mapping' is not defined
#distutils_enable_sphinx docs \
# dev-python/sphinx-astropy \
# dev-python/scipy \
# dev-python/scikit-learn \
# dev-python/scikit-image
# Disable intersphinx
#python_prepare_all() {
# sed -i '/^SPHINXOPTS/s/$/& -D disable_intersphinx=1/' "${S}"/docs/Makefile || die
# distutils-r1_python_prepare_all
#}
python_prepare_all() {
use local-datasets && { eapply "${FILESDIR}/"${P}-datasets-use-local.patch; mkdir -p ${PN}/datasets/data ; \
for ldata in "${DISTDIR}"/*-d-*; do { cp ${ldata} "${S}"/${PN}/datasets/data/${ldata##*-d-} || die ; } ; done ; }
distutils-r1_python_prepare_all
}
python_compile_all() {
if use doc; then
VARTEXFONTS="${T}"/fonts MPLCONFIGDIR="${T}" PYTHONPATH="${BUILD_DIR}"/install/$(python_get_sitedir) \
emake "SPHINXOPTS=$(usex intersphinx '' '-D disable_intersphinx=1')" -C docs html
HTML_DOCS=( docs/_build/html/. )
fi
}
python_test() {
epytest "${BUILD_DIR}" --remote-data
}
pkg_postinst() {
optfeature "power a variety of plotting features (e.g., plotting apertures)" ">=dev-python/matplotlib-3.9"
optfeature "perform aperture photometry using region objects" ">=dev-python/regions-0.9"
optfeature "deblending segmented sources" ">=dev-python/scikit-image-0.23"
optfeature "make_gwcs to create a simple celestial gwcs object" ">=dev-python/gwcs-0.20"
optfeature "improves the performance of sigma clipping and other functionality that may require computing statistics on arrays with NaN values" ">=dev-python/bottleneck-1.4"
optfeature "display optional progress bars" ">=dev-python/tqdm-4.66"
optfeature "convert source segments into polygon objects" ">=dev-python/rasterio-1.4"
optfeature "converting source segments into polygon objects" ">=dev-python/rasterio-1.3.7 >=dev-python/shapely-2.0"
}
Manage flags for this package:
euse -i <flag> -p dev-python/photutils |
euse -E <flag> -p dev-python/photutils |
euse -D <flag> -p dev-python/photutils
>=dev-python/numpy-2.0[]
>=dev-python/numpy-2.0[] >=dev-python/astropy-6.1.4[] >=dev-python/scipy-1.13[] all? ( >=dev-python/bottleneck-1.4[] >=dev-python/gwcs-0.20[] >=dev-python/matplotlib-3.9[] >=dev-python/rasterio-1.4[] >=dev-python/regions-0.9[] >=dev-python/scikit-image-0.23[] >=dev-python/shapely-2.0[] >=dev-python/tqdm-4.66[] )
>=dev-python/setuptools-scm-8.1[${PYTHON_USEDEP}]
>=dev-python/cython-3.1.2[${PYTHON_USEDEP}]
<dev-python/cython-4[${PYTHON_USEDEP}]
>=dev-python/extension-helpers-1.3[${PYTHON_USEDEP}]
doc? (
${RDEPEND}
>=dev-python/sphinx-astropy-1.9.1[${PYTHON_USEDEP},confv2]
>=dev-python/sphinx-design-0.6[${PYTHON_USEDEP}]
>=dev-python/sphinx-reredirects-1.1[${PYTHON_USEDEP}]
dev-python/rasterio[${PYTHON_USEDEP}]
dev-python/scikit-image[${PYTHON_USEDEP}]
dev-python/shapely[${PYTHON_USEDEP}]
$(python_gen_cond_dep 'dev-python/tomli[${PYTHON_USEDEP}]' python3_10)
media-gfx/graphviz
)
test? (
dev-python/bottleneck[${PYTHON_USEDEP}]
dev-python/scikit-image[${PYTHON_USEDEP}]
dev-python/regions[${PYTHON_USEDEP}]
dev-python/gwcs[${PYTHON_USEDEP}]
dev-python/matplotlib[${PYTHON_USEDEP}]
dev-python/rasterio[${PYTHON_USEDEP}]
dev-python/shapely[${PYTHON_USEDEP}]
dev-python/tqdm[${PYTHON_USEDEP}]
)