Github messages for voidlinux
 help / color / mirror / Atom feed
From: classabbyamp <classabbyamp@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: python3-pytest-xdist and dependencies
Date: Fri, 10 Jun 2022 00:57:08 +0200	[thread overview]
Message-ID: <20220609225708._gv0BOuZJ9i8M6KPh31Ql1qVgeCuwi90XEGmUYCao8U@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-37099@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1372 bytes --]

There is an updated pull request by classabbyamp against master on the void-packages repository

https://github.com/classabbyamp/void-packages new/python3-pytest-xdist
https://github.com/void-linux/void-packages/pull/37099

New package: python3-pytest-xdist and dependencies
- New package: python3-execnet-1.9.0
- New package: python3-pytest-forked-1.4.0
- New package: python3-pytest-xdist-2.5.0

<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

#### New package
- This new package conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements): **YES**

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/37099.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-new/python3-pytest-xdist-37099.patch --]
[-- Type: text/x-diff, Size: 5983 bytes --]

From 0c462c7d05850627a51cf838286043b9bb1acd58 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Fri, 13 May 2022 02:10:50 -0400
Subject: [PATCH 1/4] New package: python3-execnet-1.9.0

---
 srcpkgs/python3-execnet/template | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 srcpkgs/python3-execnet/template

diff --git a/srcpkgs/python3-execnet/template b/srcpkgs/python3-execnet/template
new file mode 100644
index 000000000000..0b3e869180fe
--- /dev/null
+++ b/srcpkgs/python3-execnet/template
@@ -0,0 +1,19 @@
+# Template file for 'python3-execnet'
+pkgname=python3-execnet
+version=1.9.0
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-setuptools_scm"
+checkdepends="python3-pytest"
+short_desc="Distributed Python deployment and communication"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="MIT"
+homepage="https://execnet.readthedocs.io/en/stable/"
+changelog="https://raw.githubusercontent.com/pytest-dev/execnet/master/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/e/execnet/execnet-${version}.tar.gz"
+checksum=8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5
+
+post_install() {
+	vlicense LICENSE
+}

From a38797ccb04b85a8992d3e62c97456dce0277d8e Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Fri, 13 May 2022 02:11:12 -0400
Subject: [PATCH 2/4] New package: python3-pytest-forked-1.4.0

---
 srcpkgs/python3-pytest-forked/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pytest-forked/template

diff --git a/srcpkgs/python3-pytest-forked/template b/srcpkgs/python3-pytest-forked/template
new file mode 100644
index 000000000000..df82db9de161
--- /dev/null
+++ b/srcpkgs/python3-pytest-forked/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pytest-forked'
+pkgname=python3-pytest-forked
+version=1.4.0
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-setuptools_scm"
+depends="python3-pytest"
+short_desc="Run pytest tests in a forked subprocess"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="MIT"
+homepage="https://github.com/pytest-dev/pytest-forked"
+changelog="https://raw.githubusercontent.com/pytest-dev/pytest-forked/master/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/p/pytest-forked/pytest-forked-${version}.tar.gz"
+checksum=8b67587c8f98cbbadfdd804539ed5455b6ed03802203485dd2f53c1422d7440e
+# tests only work inside tox
+make_check=no
+
+post_install() {
+	vlicense LICENSE
+}

From 856db1ed9bb8517c79e12ffff272a5dfb172d7d5 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Fri, 13 May 2022 02:11:49 -0400
Subject: [PATCH 3/4] New package: python3-pytest-xdist-2.5.0

---
 srcpkgs/python3-pytest-xdist/template | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 srcpkgs/python3-pytest-xdist/template

diff --git a/srcpkgs/python3-pytest-xdist/template b/srcpkgs/python3-pytest-xdist/template
new file mode 100644
index 000000000000..36392a27d41d
--- /dev/null
+++ b/srcpkgs/python3-pytest-xdist/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pytest-xdist'
+pkgname=python3-pytest-xdist
+version=2.5.0
+revision=1
+wrksrc="${pkgname#python3-}-${version}"
+build_style=python3-module
+hostmakedepends="python3-setuptools python3-setuptools_scm"
+depends="python3-pytest python3-pytest-forked python3-execnet"
+short_desc="Pytest plugin for distributed testing & loop-on-failures testing modes"
+maintainer="classabbyamp <void@placeviolette.net>"
+license="MIT"
+homepage="https://github.com/pytest-dev/pytest-xdist"
+changelog="https://raw.githubusercontent.com/pytest-dev/pytest-xdist/master/CHANGELOG.rst"
+distfiles="${PYPI_SITE}/p/pytest-xdist/pytest-xdist-${version}.tar.gz"
+checksum=4580deca3ff04ddb2ac53eba39d76cb5dd5edeac050cb6fbc768b0dd712b4edf
+# tests only work in tox
+make_check=no
+
+post_install() {
+	vlicense LICENSE
+}

From bb5d35f4a3d4ce598f734af69b5fcb603a3941a4 Mon Sep 17 00:00:00 2001
From: classabbyamp <dev@placeviolette.net>
Date: Sat, 14 May 2022 15:23:13 -0400
Subject: [PATCH 4/4] common/build-style/python3-*: add support for
 pytest-xdist

if python3-pytest-xdist is included in checkdepends, use $XBPS_MAKEJOBS
to run tests in parallel.
---
 common/build-style/python3-module.sh | 6 +++++-
 common/build-style/python3-pep517.sh | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/common/build-style/python3-module.sh b/common/build-style/python3-module.sh
index 6ec5225d6aab..a0a694ee4a97 100644
--- a/common/build-style/python3-module.sh
+++ b/common/build-style/python3-module.sh
@@ -24,10 +24,14 @@ do_build() {
 }
 
 do_check() {
+	local testjobs
 	if python3 -c 'import pytest' >/dev/null 2>&1; then
+		if python3 -c 'import xdist' >/dev/null 2>&1; then
+			testjobs="-n $XBPS_MAKEJOBS"
+		fi
 		PYTHONPATH="$(cd build/lib* && pwd)" \
 			${make_check_pre} \
-			python3 -m pytest ${make_check_args} ${make_check_target}
+			python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target}
 	else
 		# Fall back to deprecated setup.py test orchestration without pytest
 		if [ -z "$make_check_target" ]; then
diff --git a/common/build-style/python3-pep517.sh b/common/build-style/python3-pep517.sh
index 62cfac7d67d3..1eeb4172492e 100644
--- a/common/build-style/python3-pep517.sh
+++ b/common/build-style/python3-pep517.sh
@@ -13,8 +13,12 @@ do_build() {
 }
 
 do_check() {
+	local testjobs
 	if python3 -c 'import pytest' >/dev/null 2>&1; then
-		${make_check_pre} python3 -m pytest ${make_check_args} ${make_check_target}
+		if python3 -c 'import xdist' >/dev/null 2>&1; then
+			testjobs="-n $XBPS_MAKEJOBS"
+		fi
+		${make_check_pre} python3 -m pytest ${testjobs} ${make_check_args} ${make_check_target}
 	else
 		msg_warn "Unable to determine tests for PEP517 Python templates"
 		return 0

  parent reply	other threads:[~2022-06-09 22:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  6:13 [PR PATCH] " classabbyamp
2022-05-13  6:39 ` classabbyamp
2022-05-13 16:40 ` classabbyamp
2022-05-14 18:58 ` ahesford
2022-05-14 19:20 ` classabbyamp
2022-05-14 19:21 ` classabbyamp
2022-05-14 19:25 ` [PR PATCH] [Updated] " classabbyamp
2022-05-14 20:29 ` tornaria
2022-05-17 17:05 ` [PR PATCH] [Updated] " classabbyamp
2022-05-17 19:45 ` [PR REVIEW] " basploeger
2022-05-17 19:51 ` basploeger
2022-05-17 20:35 ` classabbyamp
2022-05-28  6:55 ` [PR PATCH] [Updated] " classabbyamp
2022-06-05 13:05 ` basploeger
2022-06-07 15:23 ` [PR PATCH] [Updated] " classabbyamp
2022-06-07 15:27 ` classabbyamp
2022-06-09 22:49 ` [PR REVIEW] " jcgruenhage
2022-06-09 22:52 ` jcgruenhage
2022-06-09 22:53 ` classabbyamp
2022-06-09 22:53 ` classabbyamp
2022-06-09 22:54 ` jcgruenhage
2022-06-09 22:57 ` classabbyamp [this message]
2022-06-09 22:58 ` jcgruenhage
2022-06-10  1:44 ` [PR PATCH] [Merged]: " ahesford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220609225708._gv0BOuZJ9i8M6KPh31Ql1qVgeCuwi90XEGmUYCao8U@z \
    --to=classabbyamp@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).