sci-ml/ultralytics - 8.4.137 (zGentoo)

Search

Install

Install this version:

emerge -a =sci-ml/ultralytics-8.4.137

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

autounmask =sci-ml/ultralytics-8.4.137

Or alternatively:

emerge --autounmask-write -a =sci-ml/ultralytics-8.4.137

Package Information

Description:
Ultralytics YOLO — object detection, segmentation, classification
Homepage:
https://github.com/ultralytics/ultralytics
License:
AGPL-3

Ebuild Details

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

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{12..14} )
DISTUTILS_SINGLE_IMPL=1
inherit distutils-r1

DESCRIPTION="Ultralytics YOLO — object detection, segmentation, classification"
HOMEPAGE="https://github.com/ultralytics/ultralytics"
SRC_URI="https://github.com/ultralytics/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="~amd64"
RESTRICT="test"

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

RDEPEND="
	${PYTHON_DEPS}
	virtual/pytorch
	$(python_gen_cond_dep '
		dev-python/numpy[${PYTHON_USEDEP}]
		dev-python/matplotlib[${PYTHON_USEDEP}]
		dev-python/pillow[${PYTHON_USEDEP}]
		dev-python/pyyaml[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
		dev-python/tqdm[${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
	')
	media-libs/opencv[python]
"

src_prepare() {
	# Remove version constraints and deps not in Gentoo from pyproject.toml.
	# Gentoo deps are declared in RDEPEND; this just unblocks the wheel build.
	sed -i \
		-e '/^\[project\]$/,/^\[/{' \
		-e '/torch.*sys_platform.*win32/d' \
		-e '/filelock/d' \
		-e '/polars/d' \
		-e '/nvidia-ml-py/d' \
		-e '/ultralytics-thop/d' \
		-e '/ultralytics-platform/d' \
		-e 's/"torch[^"]*"/"torch"/' \
		-e 's/"torchvision[^"]*"/"torchvision"/' \
		-e 's/"numpy[^"]*"/"numpy"/' \
		-e 's/"opencv-python[^"]*"/"opencv-python"/' \
		-e 's/"pillow[^"]*"/"pillow"/' \
		-e 's/"matplotlib[^"]*"/"matplotlib"/' \
		-e 's/"pyyaml[^"]*"/"pyyaml"/' \
		-e 's/"requests[^"]*"/"requests"/' \
		-e 's/"psutil[^"]*"/"psutil"/' \
		-e 's/"scipy[^"]*"/"scipy"/' \
		-e 's/"tqdm[^"]*"/"tqdm"/' \
		-e '}' \
		pyproject.toml || die "sed failed on pyproject.toml"
	# Remove tests dir that leaks into site-packages
	rm -rf tests
	distutils-r1_src_prepare
}

Inherited Eclasses

Dependencies

RDEPEND

	${PYTHON_DEPS}
	virtual/pytorch
	$(python_gen_cond_dep '
		dev-python/numpy[${PYTHON_USEDEP}]
		dev-python/matplotlib[${PYTHON_USEDEP}]
		dev-python/pillow[${PYTHON_USEDEP}]
		dev-python/pyyaml[${PYTHON_USEDEP}]
		dev-python/requests[${PYTHON_USEDEP}]
		dev-python/psutil[${PYTHON_USEDEP}]
		dev-python/tqdm[${PYTHON_USEDEP}]
		dev-python/scipy[${PYTHON_USEDEP}]
	')
	media-libs/opencv[python]

Manifest for 8.4.137

Type File Size Source URLs
DIST ultralytics-8.4.137.tar.gz 2639446 bytes https://github.com/ultralytics/ultralytics/archive/refs/tags/v8.4.137.tar.gz