dev-python/tqdm: bump to 4.33.0, PyPy{,3} support, add tests
authorLouis Sautier <sbraz@gentoo.org>
Tue, 13 Aug 2019 23:10:24 +0000 (01:10 +0200)
committerLouis Sautier <sbraz@gentoo.org>
Tue, 13 Aug 2019 23:19:09 +0000 (01:19 +0200)
Also avoid compressing examples, fix manpage installation.

Package-Manager: Portage-2.3.71, Repoman-2.3.16
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
dev-python/tqdm/Manifest
dev-python/tqdm/tqdm-4.33.0.ebuild [new file with mode: 0644]

index 9c7f02bad2b400e6c0c2b0658c4609db7ee5df11..a211058c5f49255d39da454cdeef7b81a890f0ad 100644 (file)
@@ -1,2 +1,3 @@
 DIST tqdm-4.23.3.tar.gz 75941 BLAKE2B 9e5810765e8f7ea4f54b0f93f453d278d5ad4b1710f1476a6f00ff2e513789585e97dcd5a8331fe69d3593b18affd50bf9bf51cbaed29ecd68d4efad9318aa31 SHA512 40c853b7cf7611ba2ef7652417c0d42ea4392f5ea9cbe319dbb9e3dd063594e5c637fb5d13f77935fb9a034d395b28fa9480fec1c6cca1852644add4ac18cce8
 DIST tqdm-4.32.2.tar.gz 118690 BLAKE2B 21ae94fb1ba3db06f79dba021c5c68b089a64cf3cef94a7eabd30f93403fc99a69b0069d7e730e3cde965219a1762fc1d4a5db4dcf351fbf39c6176fec3caae6 SHA512 60811944f755115fe41e9c6971ee959ceeb9a7f61a4ed7ed5f16b3f2c0bc631448cc05a5f13109eb94b7f01f7bffba6267ab10e56a0f3fcd10f091f186164794
+DIST tqdm-4.33.0.tar.gz 121571 BLAKE2B f4ee73cfa710462e148f6034ac69144d845d216bd97e16a78bc1f1ed5d658b6cd695d07aa1ea6ec93e2e747ab8fc52263a580c01516d1f111dcb5766b019925d SHA512 de86a2dc2c5f887b9671ee01e7c05820375b0ef83dec92f17da4d944dd02cbf96a133fd9d349ba5f9c75af70e7b87110a9a7ad3293c7eb81e49ed6ea288ba73c
diff --git a/dev-python/tqdm/tqdm-4.33.0.ebuild b/dev-python/tqdm/tqdm-4.33.0.ebuild
new file mode 100644 (file)
index 0000000..9a0b9b8
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( pypy{,3} python{2_7,3_{5,6,7}} )
+
+inherit distutils-r1
+
+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"
+
+LICENSE="MIT"
+SLOT="0"
+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
+}
+
+python_install_all() {
+       if use examples; then
+               dodoc -r examples
+               docompress -x /usr/share/doc/${PF}/examples
+       fi
+       distutils-r1_python_install_all
+}