# Copyright 2025-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# Autogenerated by pycargoebuild 0.16.0

EAPI=8

RUST_MIN_VER="1.92.0"
CRATES="
	bon-macros@3.9.3
	bon@3.9.3
	bytemuck@1.25.1
	byteorder@1.5.0
	cc@1.2.67
	cfg-if@1.0.4
	cmake@0.1.58
	crunchy@0.2.4
	darling@0.23.0
	darling_core@0.23.0
	darling_macro@0.23.0
	find-msvc-tools@0.1.9
	half@2.7.1
	heck@0.5.0
	ident_case@1.0.1
	jpegxl-rs@0.15.0+libjxl-0.12.0
	jpegxl-src@0.12.0
	jpegxl-sys@0.13.0+libjxl-0.12.0
	libc@0.2.186
	once_cell@1.21.4
	pkg-config@0.3.33
	portable-atomic@1.13.1
	prettyplease@0.2.37
	proc-macro2@1.0.106
	pyo3-build-config@0.29.0
	pyo3-ffi@0.29.0
	pyo3-macros-backend@0.29.0
	pyo3-macros@0.29.0
	pyo3@0.29.0
	quote@1.0.46
	rustversion@1.0.23
	shlex@2.0.1
	strsim@0.11.1
	syn@2.0.119
	target-lexicon@0.13.5
	thiserror-impl@2.0.18
	thiserror@2.0.18
	unicode-ident@1.0.24
	zerocopy-derive@0.8.54
	zerocopy@0.8.54
"

DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=maturin
PYTHON_COMPAT=( python3_{12..15} )

inherit cargo distutils-r1 pypi

DESCRIPTION="Pillow plugin for JPEG-XL, using Rust for bindings"
HOMEPAGE="
	https://github.com/Isotr0py/pillow-jpegxl-plugin
	https://pypi.org/project/pillow-jxl-plugin/
"
SRC_URI+=" ${CARGO_CRATE_URIS}"

LICENSE="GPL-3"
# Dependent crate licenses
LICENSE+=" Apache-2.0-with-LLVM-exceptions BSD GPL-3+ MIT Unicode-3.0"
SLOT="0"
KEYWORDS="~amd64"
IUSE="test"
RESTRICT="test" # requires unpackaged deps (OpenEXR Python binding)

REPENDS="
	dev-python/packaging[${PYTHON_USEDEP}]
	dev-python/pillow[${PYTHON_USEDEP}]
"

# distutils_enable_tests pytest