47 lines
1.2 KiB
Bash
47 lines
1.2 KiB
Bash
|
# Copyright 1999-2021 Gentoo Authors
|
||
|
# Distributed under the terms of the GNU General Public License v2
|
||
|
|
||
|
EAPI="8"
|
||
|
|
||
|
PYTHON_COMPAT=( python3_{8..10} )
|
||
|
|
||
|
inherit distutils-r1
|
||
|
|
||
|
DESCRIPTION="A bridge for python to the YouLess sensor"
|
||
|
HOMEPAGE="https://bitbucket.org/jongsoftdev/youless-python-bridge/src/master/ https://pypi.org/project/youless-api/"
|
||
|
MY_PN=${PN/-/_}
|
||
|
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${MY_PN}-${PV}.tar.gz -> ${P}.tar.gz"
|
||
|
S="${WORKDIR}/${MY_PN}-${PV}"
|
||
|
|
||
|
LICENSE="MIT"
|
||
|
SLOT="0"
|
||
|
KEYWORDS="~amd64 ~arm ~arm64 ~x86 ~amd64-linux ~x86-linux"
|
||
|
IUSE="test"
|
||
|
|
||
|
DOCS="README.md"
|
||
|
|
||
|
RDEPEND="dev-python/certifi[${PYTHON_USEDEP}]
|
||
|
dev-python/chardet[${PYTHON_USEDEP}]
|
||
|
dev-python/idna[${PYTHON_USEDEP}]
|
||
|
dev-python/requests[${PYTHON_USEDEP}]
|
||
|
dev-python/six[${PYTHON_USEDEP}]
|
||
|
dev-python/urllib3[${PYTHON_USEDEP}]"
|
||
|
BDEPEND="
|
||
|
dev-python/setuptools[${PYTHON_USEDEP}]
|
||
|
test? (
|
||
|
dev-python/nose[${PYTHON_USEDEP}]
|
||
|
dev-python/pytest[${PYTHON_USEDEP}]
|
||
|
)"
|
||
|
|
||
|
src_prepare() {
|
||
|
# Make it easy, this guy pins everything
|
||
|
cat requirements.txt | cut -d "=" -f1 > requirements_new.txt
|
||
|
mv requirements_new.txt requirements.txt
|
||
|
eapply_user
|
||
|
}
|
||
|
|
||
|
python_test() {
|
||
|
nosetests --verbose || die
|
||
|
py.test -v -v || die
|
||
|
}
|