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

EAPI=8

PYTHON_COMPAT=( python3_{12..15} )
DISTUTILS_USE_PEP517=setuptools

inherit distutils-r1

DESCRIPTION="Create MPS/LP files, call solvers, and present results"
HOMEPAGE="https://coin-or.github.io/pulp/"
SRC_URI="https://github.com/coin-or/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"

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

RDEPEND="sci-libs/coinor-cbc"

EPYTEST_PLUGINS=()
distutils_enable_tests pytest

python_prepare_all() {
	# exclude installation of precompiled binaries
	sed -i '/"pulp\.solverdir/d' pyproject.toml || die
	distutils-r1_python_prepare_all
}