tkurbad-overlay/sci-electronics/ampy/ampy-9999.ebuild
2023-07-03 11:36:29 +02:00

50 lines
1.1 KiB
Bash

# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=8
PYTHON_COMPAT=( python3_{9..12} )
DISTUTILS_SINGLE_IMPL=1
inherit distutils-r1
DESCRIPTION="MicroPython Tool - Utility to interact with a MicroPython board over a serial connection."
HOMEPAGE="https://github.com/scientifichackers/ampy"
if [[ ${PV} == "9999" ]] ; then
EGIT_REPO_URI="https://github.com/scientifichackers/${PN}.git"
KEYWORDS=""
inherit git-r3
else
inherit pypi
KEYWORDS="~amd64 ~x86"
fi
LICENSE="MIT"
SLOT="0"
IUSE=""
RESTRICT="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="$(python_gen_cond_dep '
dev-python/click[${PYTHON_USEDEP}]
dev-python/pyserial[${PYTHON_USEDEP}]
dev-python/python-dotenv[${PYTHON_USEDEP}]
')
"
DEPEND="${RDEPEND}"
src_prepare() {
sed "s/from progress_bar import /from ampy.progress_bar import /" \
-i ampy/cli.py || die "sed failed"
default
}
src_install() {
python_domodule ${PN}
python_doscript ${FILESDIR}/ampy
dodoc LICENSE README.md
}