Install this version:
emerge -a =dev-python/xraylib-4.2.1
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =dev-python/xraylib-4.2.1
Or alternatively:
emerge --autounmask-write -a =dev-python/xraylib-4.2.1
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=meson-python
DISTUTILS_EXT=1
PYTHON_COMPAT=( python3_{12..14} )
inherit distutils-r1 pypi
DESCRIPTION="Library for X-ray matter interaction cross sections (Python bindings)"
HOMEPAGE="
https://github.com/tschoonj/xraylib
https://pypi.org/project/xraylib/
"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64"
RDEPEND="
dev-python/numpy[${PYTHON_USEDEP}]
"
BDEPEND="
dev-lang/swig
dev-python/cython[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
"
# The PyPI sdist bakes its meson setup args into pyproject.toml
# ([tool.meson-python.args]): the C library is built static and only the
# classic + numpy Python bindings are installed (Fortran disabled).
PATCHES=(
"${FILESDIR}"/${P}-meson-install-tag-scalar.patch
)
dev-python/numpy[]
dev-lang/swig dev-python/cython[] dev-python/numpy[]