dev-python/pyswarms - 1.3.0 (stuff)

Search

Install

Install this version:

emerge -a =dev-python/pyswarms-1.3.0

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

autounmask =dev-python/pyswarms-1.3.0

Or alternatively:

emerge --autounmask-write -a =dev-python/pyswarms-1.3.0

Package Information

Description:
A research toolkit for particle swarm optimization in Python
Homepage:
https://github.com/ljvmiranda921/pyswarms https://pypi.org/project/pyswarms/
License:
MIT

Ebuild Details

Version EAPI Keywords Slot
1.3.0 8 ~amd64 ~arm64 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
PYTHON_COMPAT=( python3_{12..14} )

inherit distutils-r1 pypi

DESCRIPTION="A research toolkit for particle swarm optimization in Python"
HOMEPAGE="
	https://github.com/ljvmiranda921/pyswarms
	https://pypi.org/project/pyswarms/
"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~arm64"

# The bundled test suite predates current matplotlib/numpy (e.g. imports
# the removed matplotlib.axes._subplots private API); upstream-tested.
RESTRICT="test"

RDEPEND="
	dev-python/attrs[${PYTHON_USEDEP}]
	dev-python/matplotlib[${PYTHON_USEDEP}]
	dev-python/numpy[${PYTHON_USEDEP}]
	dev-python/pyyaml[${PYTHON_USEDEP}]
	dev-python/scipy[${PYTHON_USEDEP}]
	dev-python/tqdm[${PYTHON_USEDEP}]
"

python_prepare_all() {
	# Drop the py2 past.builtins.xrange shim (→ range); avoids a runtime
	# dependency on the deprecated dev-python/future.
	sed -i \
		-e '/from past.builtins import xrange/d' \
		-e 's/\bxrange(/range(/g' \
		pyswarms/utils/search/random_search.py || die

	# find_packages(exclude=["docs","tests"]) lets the top-level tests
	# package leak into site-packages; broaden to glob patterns.
	sed -i -e 's/exclude=\["docs", "tests"\]/exclude=["docs", "docs.*", "tests", "tests.*"]/' setup.py || die
	distutils-r1_python_prepare_all
}

Inherited Eclasses

Dependencies

RDEPEND

	dev-python/attrs[]
	dev-python/matplotlib[]
	dev-python/numpy[]
	dev-python/pyyaml[]
	dev-python/scipy[]
	dev-python/tqdm[]