dev-python/ext4 - 1.2.4 (benzene-overlay)

Search

Package Information

Description:
Library for read only interactions with an ext4 filesystem
Homepage:
https://github.com/Eeems/python-ext4
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
1.2.4 8 ~amd64 ~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=setuptools
PYPI_VERIFY_REPO=https://github.com/Eeems/python-ext4
PYTHON_COMPAT=( python3_{11..14} )

inherit distutils-r1 pypi

DESCRIPTION="Library for read only interactions with an ext4 filesystem"
HOMEPAGE="https://github.com/Eeems/python-ext4"
SRC_URI+=" test? (
		https://github.com/Eeems/python-ext4/raw/refs/tags/v${PV}/test.py -> ${P}-test.py
		https://github.com/Eeems/python-ext4/raw/refs/tags/v${PV}/_test_image.sh -> ${P}-test-image.sh
	)
"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
RESTRICT="!test? ( test )"

RDEPEND=">=dev-python/cachetools-6.0.0[${PYTHON_USEDEP}]
	>=dev-python/crcmod-1.7[${PYTHON_USEDEP}]
"

python_prepare_all() {
	#if use test; then
	#	# https://github.com/Eeems/python-ext4/blob/main/test.sh
	#	install -Dm644 "${FILESDIR}"/${P}-test.txt "${T}"/txt_tmp/test.txt || die
	#	dd if=/dev/zero of=test.ext4.tmp count=1024 bs=1024 || die
	#	mkfs.ext4 test.ext4.tmp -d "${T}"/txt_tmp || die
	#	echo -n F > test.ext4 || die
	#	cat test.ext4.tmp >> test.ext4 || die
	#fi
	use test && { bash "${DISTDIR}"/${P}-test-image.sh || die ; }

	distutils-r1_python_prepare_all
}

python_test() {
	${EPYTHON} "${DISTDIR}"/${P}-test.py || die "Tests failed with ${EPYTHON}"
}

USE Flags

Dependencies

RDEPEND

>=dev-python/cachetools-6.0.0[${PYTHON_USEDEP}]
	>=dev-python/crcmod-1.7[${PYTHON_USEDEP}]