Added live ebuild for ampy

This commit is contained in:
layman 2022-05-12 12:25:13 +02:00
parent 48e60747d9
commit 4676fa9b14
3 changed files with 59 additions and 0 deletions

View File

@ -0,0 +1,2 @@
AUX ampy 207 BLAKE2B 3aceb69f428fe0b54ddf695c9eb4c2510aace96308c6dafac68525e2d1d5c34c67356234d5972114676d912e402569a0d0bce61ddd2206549b207860186f7ed4 SHA512 e3ccdf1bdbf27df31b91ba1d08b2072b3b3d4f2a3614182f5a162ef03b38305aef2654ba51b97775a8c840504f9538907f6c17932e07973a4f097e29f355c20c
EBUILD ampy-9999.ebuild 1096 BLAKE2B 83de215272429bcfe29a049a0f5e7d9b2d0acf71229580263bf39af990f78cd02c9d82df06480eb7eac8564fd9491a60778c60e91bb3094dffae2b95c2aed8f1 SHA512 ff605484170eb972d3b91c8fe56619fb6fde580c0c510b89301f1828feea0d07be168aa72bf076913692916d9679fa827e16c5c421f1f333db772b75eaf4c291

View File

@ -0,0 +1,47 @@
# 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
}

View File

@ -0,0 +1,10 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from ampy.cli import cli
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(cli())