summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirgil Dupras <vdupras@gentoo.org>2019-05-15 12:11:23 -0400
committerVirgil Dupras <vdupras@gentoo.org>2019-05-15 12:11:34 -0400
commit24759bf2f4fabdce810e7417952fbbb4f6c3598d (patch)
treee27c4cab0c0ecae3089bfbc17d24efcc5c1fa42c
parentdev-python/wcwidth: remove old (diff)
downloadgentoo-24759bf2f4fabdce810e7417952fbbb4f6c3598d.tar.gz
gentoo-24759bf2f4fabdce810e7417952fbbb4f6c3598d.tar.bz2
gentoo-24759bf2f4fabdce810e7417952fbbb4f6c3598d.zip
dev-python/pytest: bump to 4.5.0
Had to drop keywords due to new deps. Also, got rid of setuptools_scm. Signed-off-by: Virgil Dupras <vdupras@gentoo.org> Package-Manager: Portage-2.3.62, Repoman-2.3.11
-rw-r--r--dev-python/pytest/Manifest1
-rw-r--r--dev-python/pytest/files/pytest-4.5.0-strip-setuptools_scm.patch25
-rw-r--r--dev-python/pytest/pytest-4.5.0.ebuild67
3 files changed, 93 insertions, 0 deletions
diff --git a/dev-python/pytest/Manifest b/dev-python/pytest/Manifest
index 5e1c6e49fc6..c0a94469f60 100644
--- a/dev-python/pytest/Manifest
+++ b/dev-python/pytest/Manifest
@@ -1,3 +1,4 @@
DIST pytest-3.10.1.tar.gz 892420 BLAKE2B 38849ae69bf4380bc1a99aa105cac04be078da4460373dfc16fa555238b2830fa2f5ae6c19de8aa2af9ac18d87c5d2705d62f7b2e67e4a62d843f6a28bbd76fd SHA512 30ff79c0fdcbeef68e1191ff400a20428e391717f06957f554b694b94baaaa565dca01346fe989c3e443c4402f3b2bdbd5564f6303a4447f933fb54cba45628f
DIST pytest-3.4.2.tar.gz 812719 BLAKE2B 96623d6cdea4bd79778175c18c949938505f1862010f700f9a8cb85f445910381af391a5b69e664fbbfc254bf46502c798c72026772070236a0a3bca7aeeb3d6 SHA512 787065ab76d4482799bb2da9f024c9c383e68cc1cc01f3b80f6ed9444ca6383d20953615696ed4dd01668777b094cf5002b23c4ce51828879dcf8ebf2170c71b
DIST pytest-4.4.2.tar.gz 932427 BLAKE2B 89734bc49bbfb40de1e613678682e3c5994e1991abfa6c6aac5e9d67c58db874a91c03c05ab15cb1b70680289b409db6546c3540d33a50791a882be0e2621e2c SHA512 14a5a93fef129f58f37686b39ae1bfa3a32bc81f7ee83b6f754e0d7f18e85c0c7f44f12651dc9b3eb2ff62ab4aca5665b33e1c319051c7d8e3d5e004047150ec
+DIST pytest-4.5.0.tar.gz 943607 BLAKE2B 49a0e91fda7f4231fdd39f90eb2daa344d3034c10faff221330ea0ae7482a2a7d0fb9443a0a264db00f1d92568d5a6005cb73e07d8643b46906f7ecff831adcb SHA512 cbffc6216f83491b1de241058315c116697bfaa5206b5f558192a7f861d43dd036d30d0d689bedae7bdee4f0258dd19ef5827c356e11863dd596a5fabe8249fc
diff --git a/dev-python/pytest/files/pytest-4.5.0-strip-setuptools_scm.patch b/dev-python/pytest/files/pytest-4.5.0-strip-setuptools_scm.patch
new file mode 100644
index 00000000000..ae6be933bca
--- /dev/null
+++ b/dev-python/pytest/files/pytest-4.5.0-strip-setuptools_scm.patch
@@ -0,0 +1,25 @@
+diff --git a/setup.py b/setup.py
+index 0fb5a58a..302b5dda 100644
+--- a/setup.py
++++ b/setup.py
+@@ -1,4 +1,5 @@
+ from setuptools import setup
++import os
+
+ # TODO: if py gets upgrade to >=1.6,
+ # remove _width_of_current_line in terminal.py
+@@ -18,10 +19,12 @@ INSTALL_REQUIRES = [
+ ]
+
+
++with open("src/_pytest/_version.py", 'wt') as fp:
++ fp.write('version = "{}"'.format(os.environ['PV']))
++
+ def main():
+ setup(
+- use_scm_version={"write_to": "src/_pytest/_version.py"},
+- setup_requires=["setuptools-scm", "setuptools>=40.0"],
++ version=os.environ['PV'],
+ package_dir={"": "src"},
+ # fmt: off
+ extras_require={
diff --git a/dev-python/pytest/pytest-4.5.0.ebuild b/dev-python/pytest/pytest-4.5.0.ebuild
new file mode 100644
index 00000000000..3c2b86bcd9c
--- /dev/null
+++ b/dev-python/pytest/pytest-4.5.0.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy{,3} )
+
+inherit distutils-r1
+
+DESCRIPTION="Simple powerful testing with Python"
+HOMEPAGE="http://pytest.org/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="test"
+
+# When bumping, please check setup.py for the proper py version
+PY_VER="1.5.0"
+
+# pathlib2 has been added to stdlib before py3.6, but pytest needs __fspath__
+# support, which only came in py3.6.
+RDEPEND="
+ >=dev-python/atomicwrites-1.0[${PYTHON_USEDEP}]
+ >=dev-python/attrs-17.4.0[${PYTHON_USEDEP}]
+ >=dev-python/more-itertools-4.0.0[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/pathlib2[${PYTHON_USEDEP}]' python2_7 python3_5 )
+ >=dev-python/pluggy-0.11[${PYTHON_USEDEP}]
+ <dev-python/pluggy-1
+ >=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]
+ >=dev-python/setuptools-40[${PYTHON_USEDEP}]
+ dev-python/six[${PYTHON_USEDEP}]
+ dev-python/wcwidth[${PYTHON_USEDEP}]
+ virtual/python-funcsigs[${PYTHON_USEDEP}]"
+
+# flake cause a number of tests to fail
+DEPEND="${RDEPEND}
+ test? (
+ >=dev-python/hypothesis-3.56[${PYTHON_USEDEP}]
+ dev-python/nose[${PYTHON_USEDEP}]
+ $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' -2)
+ dev-python/requests[${PYTHON_USEDEP}]
+ !!dev-python/flaky
+ )"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.5.0-strip-setuptools_scm.patch"
+)
+
+python_prepare_all() {
+ grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
+
+ # Something in the ebuild environment causes this to hang/error.
+ # https://bugs.gentoo.org/598442
+ rm testing/test_pdb.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ # In v4.1.1, pytest started being picky about its own verbosity options.
+ # running pytest on itself with -vv made 3 tests fail. This is why we don't
+ # have it below.
+ "${EPYTHON}" "${BUILD_DIR}"/lib/pytest.py --lsof -rfsxX \
+ || die "tests failed with ${EPYTHON}"
+}