summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2019-12-31 16:16:38 +0100
committerLouis Sautier <sbraz@gentoo.org>2019-12-31 16:18:24 +0100
commitac5756ba15027d02094d1ac87dbd741d9610c74c (patch)
tree26fc3950024858c7a0ce6a2a6855aba4c097728c /dev-python/jaraco-classes
parentdev-python/jaraco-functools: remove old (diff)
downloadgentoo-ac5756ba15027d02094d1ac87dbd741d9610c74c.tar.gz
gentoo-ac5756ba15027d02094d1ac87dbd741d9610c74c.tar.bz2
gentoo-ac5756ba15027d02094d1ac87dbd741d9610c74c.zip
dev-python/jaraco-classes: bump to 3.1.0, drops Py<3.6
Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python/jaraco-classes')
-rw-r--r--dev-python/jaraco-classes/Manifest1
-rw-r--r--dev-python/jaraco-classes/jaraco-classes-3.1.0.ebuild60
2 files changed, 61 insertions, 0 deletions
diff --git a/dev-python/jaraco-classes/Manifest b/dev-python/jaraco-classes/Manifest
index eec9dfdc7d63..83382769cd6d 100644
--- a/dev-python/jaraco-classes/Manifest
+++ b/dev-python/jaraco-classes/Manifest
@@ -1 +1,2 @@
DIST jaraco.classes-2.0.tar.gz 9911 BLAKE2B aa5e5c90f16c9536239ed61e6dccbc426244c98a33a944de32239bd42a0a4944e5df3529cfd525e05cf276a4a4b028edcec734006b549053ac8817032f52b2ea SHA512 83c9a570f951ef6c3708243dce6397cfbfe963db5920550ac807878a69860b34831af5f277f956fd0b327d85462676fd6386a22d6d97c7616e01ca81d7ace694
+DIST jaraco.classes-3.1.0.tar.gz 11616 BLAKE2B 5b438f7582a9a93ca4fc97a71725c1fe3275e4bfb48f5e06b549f7ac8fb6900262165b1ad0638114d3a8d11c10f449b7930d4c2d66fa928665aaff820af88937 SHA512 697d892a01c4e8ad83f57e69dcd744f976cea67fa3efcd55b10eda02f6bf1916162c0fa952d0d711e62f62fdff62740ee55a93be9fc46ebd4ab22416092f0ff6
diff --git a/dev-python/jaraco-classes/jaraco-classes-3.1.0.ebuild b/dev-python/jaraco-classes/jaraco-classes-3.1.0.ebuild
new file mode 100644
index 000000000000..1d8913bc1a28
--- /dev/null
+++ b/dev-python/jaraco-classes/jaraco-classes-3.1.0.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Tests fail with pypy
+PYTHON_COMPAT=( pypy3 python3_{6,7,8} )
+
+inherit distutils-r1
+
+MY_PN="${PN/-/.}"
+DESCRIPTION="Classes used by other projects by developer jaraco"
+HOMEPAGE="https://github.com/jaraco/jaraco.classes"
+SRC_URI="mirror://pypi/${PN:0:1}/${MY_PN}/${MY_PN}-${PV}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc64 ~sparc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ >=dev-python/namespace-jaraco-2[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+"
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ test? (
+ ${RDEPEND}
+ >=dev-python/pytest-2.8[${PYTHON_USEDEP}]
+ )
+"
+
+S="${WORKDIR}/${MY_PN}-${PV}"
+
+distutils_enable_sphinx docs \
+ ">=dev-python/jaraco-packaging-3.2" \
+ ">=dev-python/rst-linker-1.9"
+
+python_prepare_all() {
+ # avoid a setuptools_scm dependency
+ sed -i "s:use_scm_version=True:version='${PV}':" setup.py || die
+ sed -r -i "s:setuptools_scm[[:space:]]*([><=]{1,2}[[:space:]]*[0-9.a-zA-Z]+)[[:space:]]*::" \
+ setup.cfg || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # Avoid ImportMismatchError, override pytest options to skip flake8
+ pytest -vv "${BUILD_DIR}"/lib --override-ini="addopts=--doctest-modules" \
+ || die "tests failed with ${EPYTHON}"
+}
+
+# https://wiki.gentoo.org/wiki/Project:Python/Namespace_packages#File_collisions_between_pkgutil-style_packages
+python_install() {
+ rm "${BUILD_DIR}"/lib/jaraco/__init__.py || die
+ # note: eclass may default to --skip-build in the future
+ distutils-r1_python_install --skip-build
+}