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

# Autogenerated by pycargoebuild 0.15.1

EAPI=8

RUST_MIN_VER="1.81"
CRATES="
	autocfg@1.5.0
	byteorder@1.5.0
	cc@1.2.50
	cfg-if@1.0.4
	cmake@0.1.57
	crunchy@0.2.4
	darling@0.20.11
	darling_core@0.20.11
	darling_macro@0.20.11
	derive_builder@0.20.2
	derive_builder_core@0.20.2
	derive_builder_macro@0.20.2
	find-msvc-tools@0.1.5
	fnv@1.0.7
	half@2.7.1
	heck@0.5.0
	ident_case@1.0.1
	indoc@2.0.7
	jpegxl-rs@0.11.2+libjxl-0.11.1
	jpegxl-src@0.11.2
	jpegxl-sys@0.11.2+libjxl-0.11.1
	libc@0.2.178
	memoffset@0.9.1
	once_cell@1.21.3
	pkg-config@0.3.32
	portable-atomic@1.12.0
	proc-macro2@1.0.103
	pyo3-build-config@0.27.2
	pyo3-ffi@0.27.2
	pyo3-macros-backend@0.27.2
	pyo3-macros@0.27.2
	pyo3@0.27.2
	python3-dll-a@0.2.14
	quote@1.0.42
	rustversion@1.0.22
	shlex@1.3.0
	strsim@0.11.1
	syn@2.0.111
	target-lexicon@0.13.4
	thiserror-impl@2.0.17
	thiserror@2.0.17
	unicode-ident@1.0.22
	unindent@0.2.4
	zerocopy-derive@0.8.31
	zerocopy@0.8.31
"

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

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