summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2019-08-14 01:11:21 +0200
committerLouis Sautier <sbraz@gentoo.org>2019-08-14 01:19:09 +0200
commit0ad5994c619a0d086d4b62217a4f044fdd1b3b47 (patch)
tree5d654f68b8d8866086dc44292d35190341536376
parentdev-python/tqdm: bump to 4.33.0, PyPy{,3} support, add tests (diff)
downloadgentoo-0ad5994c.tar.gz
gentoo-0ad5994c.tar.bz2
gentoo-0ad5994c.zip
dev-python/tqdm: sync live ebuild with 4.33.0
Package-Manager: Portage-2.3.71, Repoman-2.3.16 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
-rw-r--r--dev-python/tqdm/tqdm-9999.ebuild49
1 files changed, 40 insertions, 9 deletions
diff --git a/dev-python/tqdm/tqdm-9999.ebuild b/dev-python/tqdm/tqdm-9999.ebuild
index b269ad3ec5c9..9a0b9b8ea059 100644
--- a/dev-python/tqdm/tqdm-9999.ebuild
+++ b/dev-python/tqdm/tqdm-9999.ebuild
@@ -3,19 +3,50 @@
EAPI=7
-PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} )
+PYTHON_COMPAT=( pypy{,3} python{2_7,3_{5,6,7}} )
-inherit distutils-r1 git-r3
+inherit distutils-r1
-DESCRIPTION="Add a progress meter to your loops in a second."
+if [[ ${PV} == 9999 ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/tqdm/tqdm"
+else
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+ KEYWORDS="~amd64 ~x86"
+fi
+
+DESCRIPTION="Add a progress meter to your loops in a second"
HOMEPAGE="https://github.com/tqdm/tqdm"
-SRC_URI=""
-EGIT_REPO_URI="https://github.com/tqdm/tqdm"
LICENSE="MIT"
SLOT="0"
-KEYWORDS=""
-IUSE=""
+IUSE="examples test"
+
+# Uses pkg_resources
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+BDEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? ( dev-python/nose[${PYTHON_USEDEP}] )
+"
+
+python_test() {
+ # tests_main.py requires the package to be installed
+ distutils_install_for_testing
+ # Skip unpredictable performance tests
+ nosetests tqdm -v -I 'tests_perf.py' \
+ || die "tests failed with ${EPYTHON}"
+}
+
+python_install() {
+ doman "${BUILD_DIR}"/lib/tqdm/tqdm.1
+ rm "${BUILD_DIR}"/lib/tqdm/tqdm.1 || die
+ distutils-r1_python_install --skip-build
+}
-DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
-RDEPEND=""
+python_install_all() {
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ distutils-r1_python_install_all
+}