tkurbad-overlay/sci-electronics/ampy/ampy-9999.ebuild

48 lines
1.1 KiB
Bash
Raw Normal View History

2022-05-12 12:25:13 +02:00
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
inherit python-single-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
KEYWORDS="~amd64 ~x86"
SRC_URI="mirror://pypi/${P:0:1}/${PN}/${P}.tar.gz -> ${P}.tar.gz"
fi
LICENSE="MIT"
SLOT="0"
IUSE=""
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
}