media-gfx/img2pdf - 0.6.3 (gentoo)

Search

Install

Install this version:

emerge -a =media-gfx/img2pdf-0.6.3

If this version is masked, you can unmask it using the autounmask tool or standard emerge options:

autounmask =media-gfx/img2pdf-0.6.3

Or alternatively:

emerge --autounmask-write -a =media-gfx/img2pdf-0.6.3

Package Information

Description:
Losslessly convert raster images to PDF
Homepage:
https://gitlab.mister-muffin.de/josch/img2pdf/ https://pypi.org/project/img2pdf/
License:
LGPL-3+

Ebuild Details

Version EAPI Keywords Slot
0.6.3 8 ~amd64 ~ppc64 ~x86 0
View Raw Ebuild
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=flit
PYTHON_COMPAT=( python3_{12..14} )

inherit distutils-r1 pypi

DESCRIPTION="Losslessly convert raster images to PDF"
HOMEPAGE="
	https://gitlab.mister-muffin.de/josch/img2pdf/
	https://pypi.org/project/img2pdf/
"

LICENSE="LGPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~ppc64 ~x86"
IUSE="gui"

BDEPEND="
	test? (
		app-text/ghostscript-gpl
		app-text/mupdf
		app-text/poppler[cairo,png,tiff]
		dev-python/numpy[${PYTHON_USEDEP}]
		dev-python/packaging[${PYTHON_USEDEP}]
		dev-python/pillow[tiff,${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
		media-gfx/imagemagick[jpeg,jpeg2k,lcms,png,-q8,-q32,tiff]
		media-libs/exiftool
		media-libs/netpbm[jpeg]
		sys-libs/libfaketime
	)
"
RDEPEND="
	dev-python/pikepdf[${PYTHON_USEDEP}]
	dev-python/pillow[${PYTHON_USEDEP}]
	media-libs/icc-profiles-openicc
	gui? ( $(python_gen_impl_dep tk) )
"

EPYTEST_XDIST=1
distutils_enable_tests pytest

src_prepare() {
	distutils-r1_python_prepare_all

	# Remove gui executable if there's no demand/support for it.
	if ! use gui; then
		sed -i -e '/img2pdf-gui/d' pyproject.toml || die
	fi
}

python_test() {
	local EPYTEST_DESELECT=(
		# https://gitlab.mister-muffin.de/josch/img2pdf/issues/187
		src/img2pdf_test.py::test_miff_cmyk8
	)

	if has_version 'media-gfx/imagemagick[hdri]'; then
		# https://gitlab.mister-muffin.de/josch/img2pdf/issues/178
		EPYTEST_DESELECT+=(
			src/img2pdf_test.py::test_miff_cmyk16
		)
	fi

	local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
	epytest
}

USE Flags

Manage flags for this package: euse -i <flag> -p media-gfx/img2pdf | euse -E <flag> -p media-gfx/img2pdf | euse -D <flag> -p media-gfx/img2pdf

Global/Standard Flags

gui

Inherited Eclasses

Dependencies

RDEPEND

	dev-python/pikepdf[${PYTHON_USEDEP}]
	dev-python/pillow[${PYTHON_USEDEP}]
	media-libs/icc-profiles-openicc
	gui? ( $(python_gen_impl_dep tk) )

BDEPEND

	test? (
		app-text/ghostscript-gpl
		app-text/mupdf
		app-text/poppler[cairo,png,tiff]
		dev-python/numpy[]
		dev-python/packaging[]
		dev-python/pillow[tiff,]
		dev-python/scipy[]
		media-gfx/imagemagick[jpeg,jpeg2k,lcms,png,-q8,-q32,tiff]
		media-libs/exiftool
		media-libs/netpbm[jpeg]
		sys-libs/libfaketime
	)