Python Azure

This commit is contained in:
Gerben Jan Dijkman
2021-07-08 23:55:07 +02:00
parent eccf7e3e78
commit 83357f9877
59 changed files with 827 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6..8} )
inherit distutils-r1
DESCRIPTION="An utility and python library for TCP ports management"
HOMEPAGE="https://github.com/kmike/port-for"
SRC_URI="https://github.com/kmike/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="test"
BDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
DEPEND="test? ( dev-python/urllib3[${PYTHON_USEDEP}]
virtual/python-unittest-mock[${PYTHON_USEDEP}] )"
src_prepare() {
default
sed -i '/import urllib2/s/urllib2/urllib/' port_for/_download_ranges.py \
|| die "sed failed for _download_ranges.py"
}
python_test() {
"${PYTHON}" setup.py test || die "tests failed with ${EPYTHON}"
}
python_install_all() {
distutils-r1_python_install_all
find "${D}" -name 'tests.*' -delete || die "tests removing failed"
}