|
| 1 | +# Copyright 1999-2024 Gentoo Authors |
| 2 | +# Distributed under the terms of the GNU General Public License v2 |
| 3 | + |
| 4 | +EAPI=8 |
| 5 | + |
| 6 | +PYTHON_COMPAT=( python3_{11..12} ) |
| 7 | +DISTUTILS_USE_PEP517=setuptools |
| 8 | +inherit distutils-r1 pypi |
| 9 | + |
| 10 | +DESCRIPTION="A fully featured modbus protocol stack in python" |
| 11 | +HOMEPAGE="https://github.com/riptideio/pymodbus/ https://pypi.org/project/pymodbus/" |
| 12 | + |
| 13 | +LICENSE="BSD" |
| 14 | +SLOT="0" |
| 15 | +KEYWORDS="amd64 arm arm64 x86" |
| 16 | +IUSE="serial test repl simulator" |
| 17 | +RESTRICT="!test? ( test )" |
| 18 | + |
| 19 | +DOCS="README.rst" |
| 20 | + |
| 21 | +RDEPEND=" |
| 22 | + >=dev-python/typer-0.7.0[${PYTHON_USEDEP}] |
| 23 | + >=dev-python/prompt-toolkit-3.0.36[${PYTHON_USEDEP}] |
| 24 | + >=dev-python/pygments-2.15.0[${PYTHON_USEDEP}] |
| 25 | + >=dev-python/click-8.0.0[${PYTHON_USEDEP}] |
| 26 | + serial? ( |
| 27 | + >=dev-python/pyserial-3.5[${PYTHON_USEDEP}] |
| 28 | + ) |
| 29 | + simulator? ( |
| 30 | + $(python_gen_cond_dep '>=dev-python/aiohttp-3.9.0[${PYTHON_USEDEP}]' python3_12) |
| 31 | + $(python_gen_cond_dep '>=dev-python/aiohttp-3.8.6[${PYTHON_USEDEP}]' python3_11) |
| 32 | + ) |
| 33 | + repl? ( |
| 34 | + >=dev-python/pymodbus-repl-2.0.3[${PYTHON_USEDEP}] |
| 35 | + )" |
| 36 | +BDEPEND=" |
| 37 | + test? ( |
| 38 | + dev-python/mock[${PYTHON_USEDEP}] |
| 39 | + dev-python/coverage[${PYTHON_USEDEP}] |
| 40 | + dev-python/pytest[${PYTHON_USEDEP}] |
| 41 | + dev-python/pytest-asyncio[${PYTHON_USEDEP}] |
| 42 | + dev-python/pytest-cov[${PYTHON_USEDEP}] |
| 43 | + dev-python/pytest-timeout[${PYTHON_USEDEP}] |
| 44 | + )" |
| 45 | + |
| 46 | +src_prepare() { |
| 47 | + # remove dynamic-versioning |
| 48 | + sed 's/dynamic = \["version"\]/version = \"'${PV}'\"/g' -i pyproject.toml || die |
| 49 | + |
| 50 | + eapply_user |
| 51 | +} |
| 52 | + |
| 53 | +distutils_enable_tests pytest |
0 commit comments