guru/dev-python/pyftdi/pyftdi-0.55.4.ebuild
Huang Rui 5560827536
dev-python/pyftdi: new package, add 0.55.4
Signed-off-by: Huang Rui <vowstar@gmail.com>
2024-11-13 19:48:10 +08:00

40 lines
927 B
Bash

# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{10..13} )
DISTUTILS_USE_PEP517=setuptools
inherit distutils-r1 pypi
DESCRIPTION="PyFtdi provides a user-space driver for FTDI devices"
HOMEPAGE="https://github.com/eblot/pyftdi"
SRC_URI="https://github.com/eblot/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~arm64 ~riscv ~x86"
IUSE="test"
RESTRICT="!test? ( test )"
RDEPEND="
dev-python/pyusb[${PYTHON_USEDEP}]
dev-python/pyserial[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}"
BDEPEND="
test? (
dev-python/ruamel-yaml[${PYTHON_USEDEP}]
)
"
python_test() {
FTDI_LOGLEVEL=WARNING
FTDI_DEBUG=on
FTDI_VIRTUAL=off "${EPYTHON}" pyftdi/tests/mockusb.py || die
FTDI_VIRTUAL=on "${EPYTHON}" pyftdi/tests/gpio.py || die
FTDI_VIRTUAL=on "${EPYTHON}" pyftdi/tests/eeprom_mock.py || die
}