diff options
author | Louis Sautier <sbraz@gentoo.org> | 2018-08-22 00:56:27 +0200 |
---|---|---|
committer | Louis Sautier <sbraz@gentoo.org> | 2018-08-22 01:09:25 +0200 |
commit | 773c13def4f8a458b2fd65222c5c252ac77f5da8 (patch) | |
tree | 295d6105f558757f479be1d38690ebde82898007 /dev-python/colorama/colorama-0.3.9-r1.ebuild | |
parent | sys-fs/e2fsprogs: bump to v1.44.4 (diff) | |
download | gentoo-773c13def4f8a458b2fd65222c5c252ac77f5da8.tar.gz gentoo-773c13def4f8a458b2fd65222c5c252ac77f5da8.tar.bz2 gentoo-773c13def4f8a458b2fd65222c5c252ac77f5da8.zip |
dev-python/colorama: add Python 3.7, tests
This requires using the GitHub tarball instead of PyPI's.
Package-Manager: Portage-2.3.47, Repoman-2.3.10
Diffstat (limited to 'dev-python/colorama/colorama-0.3.9-r1.ebuild')
-rw-r--r-- | dev-python/colorama/colorama-0.3.9-r1.ebuild | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/dev-python/colorama/colorama-0.3.9-r1.ebuild b/dev-python/colorama/colorama-0.3.9-r1.ebuild new file mode 100644 index 000000000000..05ea77f60e5f --- /dev/null +++ b/dev-python/colorama/colorama-0.3.9-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( pypy{,3} python{2_7,3_{4,5,6,7}} ) + +inherit distutils-r1 + +DESCRIPTION="ANSI escape character sequences for colored terminal text & cursor positioning" +HOMEPAGE=" + https://pypi.org/project/colorama/ + https://github.com/tartley/colorama +" +# https://github.com/tartley/colorama/pull/183 +SRC_URI="https://github.com/tartley/${PN}/archive/${PV}.tar.gz -> ${P}.github.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="examples test" + +BDEPEND=" + dev-python/setuptools[${PYTHON_USEDEP}] + test? ( dev-python/pytest[${PYTHON_USEDEP}] ) +" + +python_install_all() { + distutils-r1_python_install_all + + if use examples; then + docinto examples + dodoc -r demos/. + docompress -x /usr/share/doc/${PF}/examples + fi +} + +python_test() { + # Skip two tests which seem to fail when stdout isn't a TTY + # https://github.com/tartley/colorama/issues/169 + pytest -vv -k "not (testInitDoesntWrapOnEmulatedWindows \ + or testInitDoesntWrapOnNonWindows)" \ + || die "tests failed with ${EPYTHON}" +} |